由于Ubuntu的官方源很慢,换成国内源就会很快。但是在网上找了很多个,换源的时候都非常慢,几个小时都装不好,今天终于成功了,用了不到一分钟,给大家分享出来,如果你也是我这种情况,可以尝试一下。
1.将原本的源备份(如果有需要的话)
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2.修改sources.list文件
sudo vim /etc/apt/sources.list
将下面的代码粘贴进去
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
3.更新
sudo apt-get update
以下是我更新时的截图
参考网友的链接:https://yq.aliyun.com/articles/704603
如有侵权,请联系我删除