ubuntu解决安装速度问题
速度慢得原因:linux系统很多的软件源链接都是在国外服务器上,由于国内防火墙影响导致下载速度极慢,甚至超时。
解决办法一:购买梯子
这样你就可以快速的下载国外服务器的软件包了,但是你得有个可靠得梯子,最好是买一个好一点得梯子,这样不仅能提高下载速度,访问国外得任何网站都没有了限制,其中得乐趣不言而喻。(这里我就不细说了)
解决办法二:修改下载源
国内很多大佬已经将软件包都复制到自己得服务器上了,这样我们只需要修改下载源为国内得源,就可以直接访问,无需经过防火墙,速度也自然加快了。
1:更换源
sudo gedit /etc/apt/sources.list
使用gedit打开文档,将下边的阿里源或者网易源复制进去,然后点击保存关闭。
阿里源:
deb http://mirrors.aliyun.com/ubuntu/ xenial main deb-src http://mirrors.aliyun.com/ubuntu/ xenial main deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main deb http://mirrors.aliyun.com/ubuntu/ xenial universe deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb http://mirrors.aliyun.com/ubuntu/ xenial-security main deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe
网易源:
deb http://mirrors.163.com/ubuntu/ wily main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ wily-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ wily-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ wily-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ wily-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ wily main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ wily-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ wily-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ wily-proposed main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ wily-backports main restricted universe multiverse
2:更新源
sudo apt-get update
复损坏的软件包,尝试卸载出错的包,重新安装正确版本的。
sudo apt-get -f install
更新软件
sudo apt-get upgrade
本文来自博客园,作者:Harry_666,转载请注明原文链接:https://www.cnblogs.com/harry66/p/13311329.html