ubuntu 20 04 更換國內源

2021-10-16 02:17:45 字數 2914 閱讀 3333

開啟sources.list檔案:

sudo gedit /etc/apt/sources.list
刪除檔案所有內容,然後加入清華源:

deb  focal main restricted

deb focal-updates main restricted

deb focal universe

deb focal-updates universe

deb focal multiverse

deb focal-updates multiverse

deb focal-backports main restricted universe multiverse

deb focal-security main restricted

deb focal-security universe

deb focal-security multiverse

重新整理軟體源資訊:

sudo

apt-get update

sudo

apt-get upgrade

sudo

apt-get dist-upgrade

如果報錯:使用sudo apt-get -f install修復損壞的軟體包,嘗試解除安裝出錯的軟體包,重新安裝正確版本的軟體。

阿里源:

deb  focal main restricted universe multiverse

deb-src focal main restricted universe multiverse

deb focal-security main restricted universe multiverse

deb-src focal-security main restricted universe multiverse

deb focal-updates main restricted universe multiverse

deb-src focal-updates main restricted universe multiverse

deb focal-proposed main restricted universe multiverse

deb-src focal-proposed main restricted universe multiverse

deb focal-backports main restricted universe multiverse

deb-src focal-backports main restricted universe multiverse

中科大源:

deb  focal main restricted universe multiverse

deb-src focal main restricted universe multiverse

deb focal-updates main restricted universe multiverse

deb-src focal-updates main restricted universe multiverse

deb focal-backports main restricted universe multiverse

deb-src focal-backports main restricted universe multiverse

deb focal-security main restricted universe multiverse

deb-src focal-security main restricted universe multiverse

deb focal-proposed main restricted universe multiverse

deb-src focal-proposed main restricted universe multiverse

網易源:

deb ubuntu/ focal main restricted universe multiverse

deb-src ubuntu/ focal main restricted universe multiverse

deb ubuntu/ focal-security main restricted universe multiverse

deb-src ubuntu/ focal-security main restricted universe multiverse

deb ubuntu/ focal-updates main restricted universe multiverse

deb-src ubuntu/ focal-updates main restricted universe multiverse

deb ubuntu/ focal-proposed main restricted universe multiverse

deb-src ubuntu/ focal-proposed main restricted universe multiverse

deb ubuntu/ focal-backports main restricted universe multiverse

deb-src ubuntu/ focal-backports main restricted universe multiverse

Ubuntu20 04國內源換源

sudo cp etc apt sources.list etc apt sources.list backupsudo gedit etc apt sources.list把下列任 一 一 個複製進去就行,檔案原來的內容刪不刪都行。阿里源 deb focal main restricted uni...

Ubuntu 更換國內源

sudo cp etc apt sources.list etc apt sources.list.bak 備份 sudo vim etc apt sources.list 修改 sudo apt get update 更新列表 阿里雲源 deb trusty main restricted uni...

ubuntu 更換國內源

安裝好ubuntu系統後,預設的軟體更新源是國外的,在國內使用速度很慢,用 apt install 安裝軟體時可能出現 網路不可達 你的網路需要認證嗎 無法定位軟體包 等錯誤,所以我們需要更換成國內的源,這樣才能正常安裝和更新軟體。桌面開啟終端,執行命令 sudo cp etc apt source...