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