ubunut 16.04 换源 & apt-get update 失败的一种问题
作者:互联网
1,换源文件 /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiv erse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted univer se multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted univers e multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted univer se multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted unive rse multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe mu ltiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted un iverse multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted uni verse multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted un iverse multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted u niverse multiverse
2,解决 apt-get update 失败
问题 : 报的是 网址出错一类的(明明PC浏览器可以正常访问网址)
解决:两个方向
(1)命令行 ping 百度,ping不通的话。网卡IP问题
vim /etc/network/interfaces
修改点 : auto ens33
#iface ens33 inet static
iface ens33 inet dhcp (打开自动获取IP,再次尝试)
(2) 有些可能是 DNS问题,自行百度
标签:http,mirrors,16.04,restricted,get,update,aliyun,ubuntu,main 来源: https://blog.csdn.net/weixin_52372485/article/details/121708242