Linux - Ubuntu下执行apt-get update报错:Some index files failed to download. They have been ignored, or old ones used instead.

Linux - Ubuntu下执行apt-get update报错:Some index files failed to download. They have been ignored, or old ones used instead.,第1张

概述报错命令 root@ubuntu:/etc/apt# apt-get update Err:1 http://mirrors.aliyun.com/ubuntu trusty InRelease Co 报错命令
root@ubuntu:/etc/apt# apt-get updateErr:1 http://mirrors.aliyun.com/ubuntu trusty InRelease  Could not resolve 'mirrors.aliyun.com'Err:2 http:mirrors.aliyun.com/ubuntu trusty-backports InRelease  Could not resolve 3 http:mirrors.aliyun.com/ubuntu trusty-proposed InRelease  Could not resolve 4 http:mirrors.aliyun.com/ubuntu trusty-security InRelease  Could not resolve 5 http:mirrors.aliyun.com/ubuntu trusty-updates InRelease  Could not resolve Reading package Lists... DoneW: Failed to fetch http:mirrors.aliyun.com/ubuntu/dists/trusty/InRelease  Could not resolve 'mirrors.aliyun.com'W: Failed to fetch http:mirrors.aliyun.com/ubuntu/dists/trusty-backports/InRelease  Could not resolve 'mirrors.aliyun.com'W: Failed to fetch http:mirrors.aliyun.com/ubuntu/dists/trusty-proposed/InRelease  Could not resolve 'mirrors.aliyun.com'W: Failed to fetch http:mirrors.aliyun.com/ubuntu/dists/trusty-security/InRelease  Could not resolve 'mirrors.aliyun.com'W: Failed to fetch http:mirrors.aliyun.com/ubuntu/dists/trusty-updates/InRelease  Could not resolve 'mirrors.aliyun.com'W: Some index files Failed to download. They have been ignored,or old ones used instead.

 

报错原因

解析域名不对

 

解决方案
vim /etc/systemd/resolved.conf

dns改成8.8.8.8

 

 

保存,重启机器即可

 

总结

以上是内存溢出为你收集整理的Linux - Ubuntu下执行apt-get update报错:Some index files failed to download. They have been ignored, or old ones used instead.全部内容,希望文章能够帮你解决Linux - Ubuntu下执行apt-get update报错:Some index files failed to download. They have been ignored, or old ones used instead.所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/1013876.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-22
下一篇2022-05-22

发表评论

登录后才能评论

评论列表(0条)

    保存