首页 > 系统服务 > 详细

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

时间:2020-04-12 11:24:42      阅读:757      评论:0      收藏:0      [点我收藏+]

报错命令

root@ubuntu:/etc/apt# apt-get update
Err: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 mirrors.aliyun.com
Err:3 http://mirrors.aliyun.com/ubuntu trusty-proposed InRelease
  Could not resolve mirrors.aliyun.com
Err:4 http://mirrors.aliyun.com/ubuntu trusty-security InRelease
  Could not resolve mirrors.aliyun.com
Err:5 http://mirrors.aliyun.com/ubuntu trusty-updates InRelease
  Could not resolve mirrors.aliyun.com
Reading package lists... Done
W: 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.

原文:https://www.cnblogs.com/poloyy/p/12683821.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!