ubuntu12.04添加国内软件源(163、sohu、ustc),编辑sources.list文件
sudo nano /etc/apt/sources.list
添加如下内容,保存然后sudo apt-get update.
如果是其它ubuntu版本,只需把precise改为相应的版本的名字。hardy(8.04),lucid(10.04),maverick(10.10),oneiric(11.10),quantal(12.10),precise(12.04)
#163
deb http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/precise-backports main restricted universe multiverse
#sohu
deb http://mirrors.sohu.com/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precisec-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
#ustc
deb http://mirrors.ustc.edu.cn/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse