ToB企服应用市场:ToB评测及商务社交产业平台

标题: Ubuntu报错E: Failed to fetch http://mirrors.cloud.aliyuncs.com解决方案 [打印本页]

作者: 惊雷无声    时间: 2024-7-17 18:13
标题: Ubuntu报错E: Failed to fetch http://mirrors.cloud.aliyuncs.com解决方案
报错内容:

在进行更新源和下载工具包时都会报错类似以下内容:
Could not resolve ‘mirrors.cloud.aliyuncs.com’
E: Failed to fetch http://mirrors.cloud.aliyuncs.com/ubuntu-ports/pool/main/n/nginx/nginx-common_1.18.0-6ubuntu14.4_all.deb Could not resolve ‘mirrors.cloud.aliyuncs.com’
E: Failed to fetch http://mirrors.cloud.aliyuncs.com/ubuntu-ports/pool/main/n/nginx/libnginx-mod-http-geoip2_1.18.0-6ubuntu14.4_arm64.deb Could not resolve ‘mirrors.cloud.aliyuncs.com’
E: Failed to fetch http://mirrors.cloud.aliyuncs.com/ubuntu-ports/pool/main/n/nginx/libnginx-mod-http-image-filter_1.18.0-6ubuntu14.4_arm64.deb Could not resolve ‘mirrors.cloud.aliyuncs.com’
E: Failed to fetch http://mirrors.cloud.aliyuncs.com/ubuntu-ports/pool/main/n/nginx/libnginx-mod-http-xslt-filter_1.18.0-6ubuntu14.4_arm64.deb Could not resolve ‘mirrors.cloud.aliyuncs.com’
E: Failed to fetch http://mirrors.cloud.aliyuncs.com/ubuntu-ports/pool/main/n/nginx/libnginx-mod-mail_1.18.0-6ubuntu14.4_arm64.deb Could not resolve ‘mirrors.cloud.aliyuncs.com’
E: Failed to fetch http://mirrors.cloud.aliyuncs.com/ubuntu-ports/pool/main/n/nginx/libnginx-mod-stream_1.18.0-6ubuntu14.4_arm64.deb Could not resolve ‘mirrors.cloud.aliyuncs.com’
E: Failed to fetch http://mirrors.cloud.aliyuncs.com/ubuntu-ports/pool/main/n/nginx/libnginx-mod-stream-geoip2_1.18.0-6ubuntu14.4_arm64.deb Could not resolve ‘mirrors.cloud.aliyuncs.com’
E: Failed to fetch http://mirrors.cloud.aliyuncs.com/ubuntu-ports/pool/main/n/nginx/nginx-core_1.18.0-6ubuntu14.4_arm64.deb Could not resolve ‘mirrors.cloud.aliyuncs.com’
E: Failed to fetch http://mirrors.cloud.aliyuncs.com/ubuntu-ports/pool/main/n/nginx/nginx_1.18.0-6ubuntu14.4_arm64.deb Could not resolve ‘mirrors.cloud.aliyuncs.com’
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
寻求方法:

报错提示无法解析阿里云镜像链接,在网上找了很多解决方案,主要指出两个题目:
1.DNS解析题目
添加了以下DNS依然存在题目

2.镜像源题目
修改成国内镜像源依然没有解决
终极解决

发现我的题目是DNS解析题目
阿里云的DNS是127.0.0.53,我添加的是127.0.0.253
修改后解决
1.打开并修改配置文件
  1. sudo vi /etc/resolv.conf
复制代码
2.在文件中添加阿里云DNS(按i进入编辑模式,添加后esc退出编辑模式,输入:wq生存并退出)
  1. nameserver 127.0.0.53
复制代码


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。




欢迎光临 ToB企服应用市场:ToB评测及商务社交产业平台 (https://dis.qidao123.com/) Powered by Discuz! X3.4