1.打开软件源列表sudo gedit /etc/apt/sources.list(把备份跳过了)
2.将里面内容替换如下。(这是12.04的版本)。对于其他版本,替换为相应的版本。
deb http://ftp.xdlinux.info/ubuntu/ precise main multiverse restricted universe
deb http://ftp.xdlinux.info/ubuntu/ precise-backports main multiverse restricted universe
deb http://ftp.xdlinux.info/ubuntu/ precise-proposed main multiverse restricted universe
deb http://ftp.xdlinux.info/ubuntu/ precise-security main multiverse restricted universe
deb http://ftp.xdlinux.info/ubuntu/ precise-updates main multiverse restricted universe
deb-src http://ftp.xdlinux.info/ubuntu/ precise main multiverse restricted universe
deb-src http://ftp.xdlinux.info/ubuntu/ precise-backports main multiverse restricted universe
deb-src http://ftp.xdlinux.info/ubuntu/ precise-proposed main multiverse restricted universe
deb-src http://ftp.xdlinux.info/ubuntu/ precise-security main multiverse restricted universe
deb-src http://ftp.xdlinux.info/ubuntu/ precise-updates main multiverse restricted universe
对于其他的版本,将上例的precise替换成对应的版本代号。(例如使用 cat /etc/issue 命令可以获知)
quantal (12.10) precise (12.04) oneiric (11.10) natty (11.04) maverick (10.10) lucid (10.04) hardy (8.04) dapper (6.06)
3.
使用 sudo apt-get update 同步本地包数据库。
4.
使用 sudo apt-get upgrade 升级所有已安装的软件包。(可以不做)