Ubuntu 14.04 更换阿里云源[转]

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份
sudo vim /etc/apt/sources.list #修改
sudo apt-get update #更新列表

deb http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe


转自:愚人渡(这个好像不能用)
   http://www.tuicool.com/articles/Fn6fI37(这个好用,但是我也不清楚为什么)

另外,update的时候可能会遇到错误:
E: Some index files failed to download
此时,尝试下列命令:

sudo rm -fR /var/lib/apt/lists/*
sudo mkdir /var/lib/apt/lists/partial
sudo apt-get update

转自:http://blog.csdn.net/tankaro/article/details/49449817
posted @ 2016-07-26 22:01  打不死的流云  阅读(431)  评论(0编辑  收藏  举报