apt源配置在 /etc/apt/sources.list ,首先备份一下:
1cd /etc/apt/ 2cp sources.list sources.list.bak
然后修改sources.list为:
1deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse 2deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse 3deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse 4deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse 5deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse 6deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse 7deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse 8deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse 9deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse 10deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
注意:上面的内容中xenial 是我的ubuntu的版本号,你要替换成你的版本号。查看版本号方法为:
lsb_release -c
如:

最后更新一下软件列表
sudo apt-get update