系统相关
首页 > 系统相关> > ubuntu 解决apt报错 E: Some index files failed to download. They have been ignored, or old ones used inst

ubuntu 解决apt报错 E: Some index files failed to download. They have been ignored, or old ones used inst

作者:互联网

网络上的解决方案大致有两个,我都用了,最后问题解决了。不太清楚是那个方法解决问题的。

方法一:修改DNS服务器

vim /etc/resolv.conf 

然后添加:

nameserver 8.8.8.8
nameserver 8.8.4.4

阿里源的再添加:

nameserver 223.5.5.5  
nameserver 223.6.6.6

最后运行

apt-get update

可能会有一些找不到,先别管,然后接着再apt-get install下载文件实施。

如果不行,尝试方法二。

方法二:更换apt源

vim /etc/apt/sources.list

可以把之前的都注释调,然后添加:

deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源码
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# Canonical 合作伙伴和附加
deb http://archive.canonical.com/ubuntu/ xenial partner

保存关闭。

apt-get update

然后再下载试试。

标签:files,index,http,multiverse,xenial,报错,ubuntu,deb,com
来源: https://blog.csdn.net/sazass/article/details/116768048