速度慢得原因: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