ubuntu中添加更新源的方法

使用apt-get安装软件的时候,可能会发生网络连接不上、找不着的情况,可以修改更新源来解决这个问题

sudo chmod 777 /etc/apt/source.list

vim /etc/apt/source.list

在这个文件中加入

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

然后再sudo apt-get update一下就OK了

猜你喜欢

转载自hyjiang1989.iteye.com/blog/1814131
今日推荐