1、备份原有
cp /etc/apt/sources.list /etc/apt/sources.list.old
2、打开阿里巴巴镜像源: https://opsx.alibaba.com/mirror,打开帮助找到
ubuntu 16.04 配置如下
deb http://mirrors.aliyun.com/ubuntu/ xenial maindeb-src http://mirrors.aliyun.com/ubuntu/ xenial maindeb http://mirrors.aliyun.com/ubuntu/ xenial-updates maindeb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates maindeb http://mirrors.aliyun.com/ubuntu/ xenial universedeb-src http://mirrors.aliyun.com/ubuntu/ xenial universedeb http://mirrors.aliyun.com/ubuntu/ xenial-updates universedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universedeb http://mirrors.aliyun.com/ubuntu/ xenial-security maindeb-src http://mirrors.aliyun.com/ubuntu/ xenial-security maindeb http://mirrors.aliyun.com/ubuntu/ xenial-security universedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe
3、修改配置
vi /etc/apt/sources.list,删除原有配置内容,并将上面的找到的ubuntu16.04配置粘贴sources.list
结果如下:
4、sudo apt-get update更新镜像源