ubuntu 把软件源修改为国内源和更新
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu 把软件源修改为国内源和更新相关的知识,希望对你有一定的参考价值。
1. 备份原始文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
2. 修改文件并添加国内源
vi /etc/apt/sources.list
3. 常见的国内和亚洲源
#cn99.com 源更新服务器(江苏省常州市电信,推荐电信用户使用): deb http://ubuntu.cn99.com/ubuntu/ gutsy main restricted universe multiverse deb http://ubuntu.cn99.com/ubuntu/ gutsy-security main restricted universe multiverse deb http://ubuntu.cn99.com/ubuntu/ gutsy-updates main restricted universe multiverse deb http://ubuntu.cn99.com/ubuntu/ gutsy-proposed main restricted universe multiverse deb http://ubuntu.cn99.com/ubuntu/ gutsy-backports main restricted universe multiverse deb-src http://ubuntu.cn99.com/ubuntu/ gutsy main restricted universe multiverse deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-security main restricted universe multiverse deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-updates main restricted universe multiverse deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-proposed main restricted universe multiverse deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-backports main restricted universe multiverse #Mirror.lupaworld.com 源更新服务器(浙江省杭州市双线服务器,网通同电信都可以用,亚洲地区官方更新服务器): deb http://mirror.lupaworld.com/ubuntu gutsy main restricted universe multiverse deb http://mirror.lupaworld.com/ubuntu gutsy-security main restricted universe multiverse deb http://mirror.lupaworld.com/ubuntu gutsy-updates main restricted universe multiverse deb http://mirror.lupaworld.com/ubuntu gutsy-backports main restricted universe multiverse deb-src http://mirror.lupaworld.com/ubuntu gutsy main restricted universe multiverse deb-src http://mirror.lupaworld.com/ubuntu gutsy-security main restricted universe multiverse deb-src http://mirror.lupaworld.com/ubuntu gutsy-updates main restricted universe multiverse deb-src http://mirror.lupaworld.com/ubuntu gutsy-backports main restricted universe multiverse #Ubuntu 官方源 deb http://archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ gutsy-security main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ gutsy-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ gutsy-proposed main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ gutsy-security main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ gutsy-updates main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ gutsy-proposed main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse #台湾的官方源 deb http://tw.archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse deb http://tw.archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse deb http://tw.archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse deb http://tw.archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse deb http://tw.archive.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse deb-src http://tw.archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse
4. 放置非官方源的包不完整,可在为不添加官方源
deb http://archive.ubuntu.org.cn/ubuntu-cn/ feisty main restricted universe multiverse
5. 更新源
sudo apt-get update
6. 更新软件
sudo apt-get dist-upgrade
7. 常见的修复安装命令
sudo apt-get -f install
以上是关于ubuntu 把软件源修改为国内源和更新的主要内容,如果未能解决你的问题,请参考以下文章