ubuntu server 12.04 官方的源代码更新比较慢,所以更替成国内的源。
163源
点击(此处)折叠或打开
- deb http://mirrors.163.com/ubuntu/ precise main restricted
- deb-src http://mirrors.163.com/ubuntu/ precise main restricted
- deb http://mirrors.163.com/ubuntu/ precise-updates main restricted
- deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted
- deb http://mirrors.163.com/ubuntu/ precise universe
- deb-src http://mirrors.163.com/ubuntu/ precise universe
- deb http://mirrors.163.com/ubuntu/ precise-updates universe
- deb-src http://mirrors.163.com/ubuntu/ precise-updates universe
- deb http://mirrors.163.com/ubuntu/ precise multiverse
- deb-src http://mirrors.163.com/ubuntu/ precise multiverse
- deb http://mirrors.163.com/ubuntu/ precise-updates multiverse
- deb-src http://mirrors.163.com/ubuntu/ precise-updates multiverse
- deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
- deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
- deb http://mirrors.163.com/ubuntu/ precise-security main restricted
- deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted
- deb http://mirrors.163.com/ubuntu/ precise-security universe
- deb-src http://mirrors.163.com/ubuntu/ precise-security universe
- deb http://mirrors.163.com/ubuntu/ precise-security multiverse
- deb-src http://mirrors.163.com/ubuntu/ precise-security multiverse
- deb http://extras.ubuntu.com/ubuntu precise main
- deb-src http://extras.ubuntu.com/ubuntu precise main
SOHU源
点击(此处)折叠或打开
- deb http://mirrors.sohu.com/ubuntu/ precise main restricted
- deb-src http://mirrors.sohu.com/ubuntu/ precise main restricted
- deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
- deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
- deb http://mirrors.sohu.com/ubuntu/ precise universe
- deb-src http://mirrors.sohu.com/ubuntu/ precise universe
- deb http://mirrors.sohu.com/ubuntu/ precise-updates universe
- deb-src http://mirrors.sohu.com/ubuntu/ precise-updates universe
- deb http://mirrors.sohu.com/ubuntu/ precise multiverse
- deb-src http://mirrors.sohu.com/ubuntu/ precise multiverse
- deb http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
- deb-src http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
- deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
- deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
- deb http://mirrors.sohu.com/ubuntu/ precise-security main restricted
- deb-src http://mirrors.sohu.com/ubuntu/ precise-security main restricted
- deb http://mirrors.sohu.com/ubuntu/ precise-security universe
- deb-src http://mirrors.sohu.com/ubuntu/ precise-security universe
- deb http://mirrors.sohu.com/ubuntu/ precise-security multiverse
- deb-src http://mirrors.sohu.com/ubuntu/ precise-security multiverse
- deb http://extras.ubuntu.com/ubuntu precise main
- deb-src http://extras.ubuntu.com/ubuntu precise main
操作如下:
点击(此处)折叠或打开
- yuan@ubuntu1204:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.apt
- yuan@ubuntu1204:~$ sudo vim /etc/apt/sources.list
- #更替163源或者sohu源
- yuan@ubuntu1204:~$ sudo apt-get update
然后会出现key无法找到。然后执行
点击(此处)折叠或打开
- yuan@ubuntu1204:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys < add keys here >
- yuan@ubuntu1204:~$ sudo apt-get update
大功告成:-)
转载于:https://blog.51cto.com/yuanxiaojun/1083396