-
cd /etc/apt
进入配置目录
-
cp ./sources.list ./sources.list.backup
备份默认源列表文件
-
rm ./sources.list
删除默认源列表文件
-
vim ./sources.list
新建源列表文件,拷贝以下内容并保存(注:以北理工的源为例)
deb http://mirror.bit.edu.cn/ubuntu/ precise main restricted
deb http://mirror.bit.edu.cn/ubuntu/ precise-updates main restricted
deb http://mirror.bit.edu.cn/ubuntu/ precise universe
deb http://mirror.bit.edu.cn/ubuntu/ precise-updates universe
deb http://mirror.bit.edu.cn/ubuntu/ precise multiverse
deb http://mirror.bit.edu.cn/ubuntu/ precise-updates multiverse
deb http://mirror.bit.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb http://mirror.bit.edu.cn/ubuntu/ precise-security main restricted
deb http://mirror.bit.edu.cn/ubuntu/ precise-security universe
deb http://mirror.bit.edu.cn/ubuntu/ precise-security multiverse
-
sudo apt-get update
更新包依赖关系