1. 程式人生 > >ubuntu報錯E:未找到軟體包xxx的換源解決辦法

ubuntu報錯E:未找到軟體包xxx的換源解決辦法

Ubuntu系統自帶的源都是國外的網址,國內使用者在使用的時候網速比較慢。一個軟體的下載是十分痛苦的,這裡講解一下如何將國外源更換為國內源,讓你的網速Biu.Biu.Biu

1.備份原來的源

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

將以前的源備份一下,以防以後可以用的。

2.更換源

sudo gedit /etc/apt/sources.list

使用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