Ubuntu中apt-get更新源

  1. cd /etc/apt进入配置目录
  2. cp ./sources.list ./sources.list.backup备份默认源列表文件
  3. rm ./sources.list删除默认源列表文件
  4. 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
  1. sudo apt-get update更新包依赖关系

你可能感兴趣的:(Ubuntu中apt-get更新源)