以下内容我都是在root用户进行的
首先做好备份
阿里的源,里面有各个系统的,我这里是Ubuntu :https://developer.aliyun.com/mirror/
点击进入Ubuntu 的配置:https://developer.aliyun.com/mirror/ubuntu?spm=a2c6h.13651102.0.0.3e221b119eYwQd
修改源的配置文件
gedit /etc/apt/sources.list
将所有内容进行替换,版本不同,源貌似不一样,去上面的网页找你的版本
deb https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiversedeb https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiversedeb https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse## Not recommended
# deb https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
保存后,更新下源
apt-get update