ubuntu14.04更换阿里云软件源

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份
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
sudo apt-get update #更新列表

如果使用其他镜像,可以参考http://wiki.ubuntu.com.cn/%E6%A8%A1%E6%9D%BF:Ubuntu_source

这个模板,记得把

# Canonical 合作伙伴和附加
deb http://archive.canonical.com/ubuntu/ vivid partner
deb http://extras.ubuntu.com/ubuntu/ vivid main

 给去掉

然后把模板中的vivid换成相应ubuntu版本,比如我这里是 trusty 

猜你喜欢

转载自jaychang.iteye.com/blog/2344975