來源 http://zgljl2012.com/ubuntu-xiu-gai-ubuntude-apt-getyuan-wei-a-li-yun-yuan-de-fang-fa/
1、原檔案備份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2、編輯源列表檔案
sudo vim /etc/apt/sources.list
3、將原來的列表刪除,新增如下內容(阿里映象源)
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multivers
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
4、執行 sudo apt-get update
如果大家有好的源,歡迎給出。 我發現這個源有點老了。