首先要备份原来的源列表:
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
再用编辑器打开
sudo gedit /etc/apt/source.list
用下面的源替换掉文件中所有的内容,保存编辑好的文件:
deb http://ftp.xdlinux.info/ubuntu/ raring main multiverse restricted universe
deb http://ftp.xdlinux.info/ubuntu/ raring-backports main multiverse restricted universe
deb http://ftp.xdlinux.info/ubuntu/ raring-proposed main multiverse restricted universe
deb http://ftp.xdlinux.info/ubuntu/ raring-security main multiverse restricted universe
deb http://ftp.xdlinux.info/ubuntu/ raring-updates main multiverse restricted universe
deb-src http://ftp.xdlinux.info/ubuntu/ raring main multiverse restricted universe
deb-src http://ftp.xdlinux.info/ubuntu/ raring-backports main multiverse restricted universe
deb-src http://ftp.xdlinux.info/ubuntu/ raring-proposed main multiverse restricted universe
deb-src http://ftp.xdlinux.info/ubuntu/ raring-security main multiverse restricted universe
deb-src http://ftp.xdlinux.info/ubuntu/ raring-updates main multiverse restricted universe
注意上面的代号要换成相应版本的代号。例如,要换成ubuntu12.04的源,则只要将上面的raring换成precise。ubuntu主要版本的代号如下:
Ubuntu 10.04 - Lucid Lynx (清醒的猞猁)
Ubuntu 12.04 - Precise Pangolin (精准的穿山甲)
Ubuntu 12.10 - Quantal Quetzal (?)
Ubuntu 13.04 - Raring Ringtail