soarli

修改ubuntu的sources.list源到阿里云
1. 首先备份源列表首先备份源列表sudo cp /etc/apt/sources.list /etc/apt/s...
扫描右侧二维码阅读全文
02
2020/02

修改ubuntu的sources.list源到阿里云

1. 首先备份源列表

首先备份源列表

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

2. 而后打开sources.list文件修改

sudo vim /etc/apt/sources.list

3. 用下面阿里原替换掉文件中所有的内容,保存编辑好的文件(最好不要这样,只需手动替换list文件的非注释链接,否则可能会造成aptitude工具与apt工具不兼容(需要卸载apt)2020.02.02亲测)

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

4. 然后刷新列表,注意一定要执行刷新(只需执行前两个)

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
#强制的:sudo apt-get -y update

参考资料:

https://wiki.ubuntu.org.cn/%E6%BA%90%E5%88%97%E8%A1%A8

https://blog.csdn.net/u010053463/article/details/49300625

https://blog.csdn.net/wang725/article/details/79902004

https://www.cnblogs.com/cyttina/archive/2013/01/29/2882111.html

最后修改:2022 年 01 月 07 日 06 : 12 PM

发表评论