今晚利用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。
希望对大家有帮助。