首先,备份一下ubuntu 12.04 原来的源地址列表文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list.old
然后进行修改
sudo gedit /etc/apt/sources.list
- deb http://mirrors.163.com/ubuntu/ quantal main restricted
- deb-src http://mirrors.163.com/ubuntu/ quantal main restricted
- deb http://mirrors.163.com/ubuntu/ quantal-updates main restricted
- deb-src http://mirrors.163.com/ubuntu/ quantal-updates main restricted
- deb http://mirrors.163.com/ubuntu/ quantal universe
- deb-src http://mirrors.163.com/ubuntu/ quantal universe
- deb http://mirrors.163.com/ubuntu/ quantal-updates universe
- deb-src http://mirrors.163.com/ubuntu/ quantal-updates universe
- deb http://mirrors.163.com/ubuntu/ quantal multiverse
- deb-src http://mirrors.163.com/ubuntu/ quantal multiverse
- deb http://mirrors.163.com/ubuntu/ quantal-updates multiverse
- deb-src http://mirrors.163.com/ubuntu/ quantal-updates multiverse
- deb http://mirrors.163.com/ubuntu/ quantal-backports main restricted universe multiverse
- deb-src http://mirrors.163.com/ubuntu/ quantal-backports main restricted universe multiverse
- deb http://mirrors.163.com/ubuntu/ quantal-security main restricted
- deb-src http://mirrors.163.com/ubuntu/ quantal-security main restricted
- deb http://mirrors.163.com/ubuntu/ quantal-security universe
- deb-src http://mirrors.163.com/ubuntu/ quantal-security universe
- deb http://mirrors.163.com/ubuntu/ quantal-security multiverse
- deb-src http://mirrors.163.com/ubuntu/ quantal-security multiverse
- deb http://extras.ubuntu.com/ubuntu quantal main
- deb-src http://extras.ubuntu.com/ubuntu quantal main
2. 打开software sources -> ubuntu sofrware -> 然后点击源的列表 -> other -> 选中163或者suhu即可。