ubuntu apt-get 报错 Failed to fetch http://
网络上的解决方案大致有两个,我都用了,最后问题解决了。不太清楚是那个方法解决问题的。方法一:修改DNS服务器vim /etc/resolv.conf然后添加:nameserver 8.8.8.8nameserver 8.8.4.4阿里源的再添加:nameserver 223.5.5.5nameserver 223.6.6.6最后运行apt-get update可能会有一些找不到,先别管,然后接着再
·
方法二:更换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
然后再下载试试。
更多推荐
已为社区贡献1条内容
所有评论(0)