一、备份原来的源
只是为了以防万一
sudo cp /etc/apt/sources.list /etc/apt/sources_init.list
二、换源
sudo gedit /etc/apt/sources.list
看到很多很多的网址,统统注释掉。我喜欢直接删掉,嘿嘿。
然后复制国内源,我这里用的阿里的源,谁让我欠马爸爸的钱呢!
deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe
然后保存关闭
然后更新
sudo apt-get update
OK!
好像网上网易的源有问题,会出现。华清的也是。大家注意哈。