Ubuntu 错误:E:未找到软件包xxx的换源解决办法

谁说胖子不能爱 提交于 2019-12-19 04:26:23

Ubuntu系统自带的都是源国外的网址,大家都懂,在外网下载东西的时候肯定比较慢,十分痛苦,这里分享下如何将国外源换为过内源,让你的网速提高。嗖嗖嗖~~~

1. 备份原来的源

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

备份下,以防以后可以用。

2. 更换源

sudo gedit /etc/apt/sources.list

使用gedit打开文档,将下面的阿里源赋值进去,然后点击保存关闭(完全覆盖)。
注意:如果gedit未安装,会报错,先执行下sudo apt-get install gedit
需要复制的内容 阿里源:

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 

3. 更新

更新源

sudo apt-get update

更新软件

sudo apt-get upgrade

到此就Over了。

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!