我是靠谱客的博主 粗暴奇迹,这篇文章主要介绍Linux - Ubuntu下执行apt-get update报错:Some index files failed to download. They have been ignored, or ol...,现在分享给大家,希望可以做个参考。

报错命令

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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.

 

报错原因

解析域名不对

 

解决方案

复制代码
1
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 ol...的全部内容,更多相关Linux内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(78)

评论列表共有 0 条评论

立即
投稿
返回
顶部