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