码迷,mamicode.com
首页 > 其他好文 > 详细

更新debian软件源

时间:2015-01-26 11:53:50      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:

1.首先备份源列表,而后用gedit或其他编辑器打开源列表文件:

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
sudo gedit /etc/apt/sources.list

2.把找到的合适的源,替换掉sources.list中所有的内容,保存。 比如163的debian源为:

deb http://mirrors.163.com/debian squeeze main non-free contrib  
deb http://mirrors.163.com/debian squeeze-proposed-updates main contrib non-free  
deb-src http://mirrors.163.com/debian squeeze main non-free contrib  
deb-src http://mirrors.163.com/debian squeeze-proposed-updates main contrib non-free  

deb http://mirrors.163.com/debian-security squeeze/updates main contrib non-free deb-src http://mirrors.163.com/debian-security squeeze/updates main contrib non-free
deb http://http.us.debian.org/debian squeeze main contrib non-free deb http://non-us.debian.org/debian-non-US squeeze/non-US main contrib non-free deb http://
security.debian.org squeeze/updates main contrib non-free

把上面的内容复制粘贴,替换掉sources.list的全部内容。
3.执行源的更新:

sudo apt-get update

4.然后,执行真正的软件更新:

 sudo apt-get upgrade

更新debian软件源

标签:

原文地址:http://www.cnblogs.com/haotianbeidou/p/4249809.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!