更换成阿里的软件仓库
1. 备份之前的文件:
cp /etc/apt/sources.list /etc/apt/sources.list.old
2. 编辑sources.list文件:
vi /etc/apt/sources.list
3. Insert 开始编辑,使用命令删除sources.list中已有内容:
删除光标所在行:dd
删除光标所在行以下的N行:Ndd
4. 清空后,粘贴以下内容:
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
5. ESC退出编辑,:wq保存并退出
6. 更新
sudo apt-get update