ubuntu 15.10 更新源和apt-get update失败的解决方案

在Ubuntu 15.10中遇到更新源失败的问题,通过编辑/etc/apt/source.list文件,注释原有源并添加清华大学的镜像源来解决。之后使用apt-get update时又遇到DNS问题,通过修改/etc/resolv.conf文件,设置DNS为202.96.128.86和202.96.128.166,重启网络以修复。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今晚利用Software & Updates工具更新源时总是出现Failed to download repository information这个错误,解决方案如下:

sudo gedit /etc/apt/source.list

然后把旧的源的命令都注释掉,再添加https://blog.csdn.net/paincupid/article/details/52895676中所列的任何一个源。

我用的是清华大学的,具体如下:

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse

然后使用sudo apt-get update更新一下,但是我又遇到update失败,错误有:

E: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/willy-proposed/restricted/binary-i386/Packages  404  Not Found [IP: 91.189.91.26 80]

……

E: Some index files failed to download, they have been ignored, or old ones used instead.

解决方法如下:

sudo gedit /etc/resolv.conf

修改dns配置如下:

search localdomain
nameserver 202.96.128.86 

nameserver 202.96.128.166 

重启网络:sudo /etc/init.d/networking restart。

希望对大家有帮助。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值