1. 程式人生 > >更改 Ubuntu 的 apt 源

更改 Ubuntu 的 apt 源

arch RR deb com inux iyu AD ror 香港

1.在更改apt源之前要先備份官方自帶的apt源

cd   /etc/apt
sudo  cp sources.list  sources.list.bak 

2. 更改 sources.list 文件

sudo gedit sources.list  或者  sudo  vim  sources.list 

3.一些 國內的 apt 源

香港中文大學:

deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ trusty main restricted universe multiverse
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ trusty-security main restricted universe multiverse
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ trusty-updates main restricted universe multiverse
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ trusty main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ trusty-backports main restricted universe multiverse

 或者用阿裏雲:

deb http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universe multiverse

ubuntu的源, 最好也加上,避免某些庫下載不到  

deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

4.運行

sudo  apt-get  update
sudo  ape-get  upgrade

  

  

 

更改 Ubuntu 的 apt 源