Ubuntu下载速度过慢解决

今天用Ubuntu下载Roberta文件到本地,速度特别慢,Ubuntu 系统自带的源文件,都是国外的源网址,在国内下载安装升级源或者依赖的时候,都比较慢,更换国内的源地址,轻松搞定此问题。

目录

一、备份原来的源文件

二、新建一个sources.list文件

三、更新apt软件源

四、优化依赖包

五、更新


一、备份原来的源文件

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

二、新建一个sources.list文件

sudo vim /etc/apt/sources.list

输入如下内容并保存退出

deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb http://cn.archive.ubuntu.com/ubuntu/ xenial universe
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse

三、更新apt软件源

sudo apt-get update

四、优化依赖包

修改损坏的依赖包,卸载出错的包,重新下载新的正确的版本

sudo apt-get -f install

五、更新

sudo apt-get upgrade

解决问题:

 


 

猜你喜欢

转载自blog.csdn.net/weixin_43734080/article/details/131296825