1.首先備份ubuntu源列表;
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (備份下當前的源列表)
2.修改更新源;
sudo vim /etc/apt/sources.list
3.刪除更新源中的資料;
300dd
上面命令的意思是刪除游標以下300行的內容,這個300可根據自己的情況修改要刪除的行數;
4.複製更新源;
在vim中按i字幕後複製貼上163或sohu的源;
163源
deb precise main restricted
deb-src precise main restricted
deb precise-updates main restricted
deb-src precise-updates main restricted
deb precise universe
deb-src precise universe
deb precise-updates universe
deb-src precise-updates universe
deb precise multiverse
deb-src precise multiverse
deb precise-updates multiverse
deb-src precise-updates multiverse
deb precise-backports main restricted universe multiverse
deb-src precise-backports main restricted universe multiverse
deb precise-security main restricted
deb-src precise-security main restricted
deb precise-security universe
deb-src precise-security universe
deb precise-security multiverse
deb-src precise-security multiverse
deb precise main
deb-src precise main
sohu源
deb precise main restricted
deb-src precise main restricted
deb precise-updates main restricted
deb-src precise-updates main restricted
deb precise universe
deb-src precise universe
deb precise-updates universe
deb-src precise-updates universe
deb precise multiverse
deb-src precise multiverse
deb precise-updates multiverse
deb-src precise-updates multiverse
deb precise-backports main restricted universe multiverse
deb-src precise-backports main restricted universe multiverse
deb precise-security main restricted
deb-src precise-security main restricted
deb precise-security universe
deb-src precise-security universe
deb precise-security multiverse
deb-src precise-security multiverse
deb precise main
deb-src precise main
上面兩個用其中乙個就可以了
然後按esc鍵 輸入:wq 儲存退出;
5.執行命令 sudo apt-get update
如果報錯 則輸入 sudo rm /var/lib/apt/lists/*-rf
再執行sudo apt-get update
然後執行sudo apt-get upgrade
Ubuntu更新源設定
在編輯之前做個備份 sudo cp etc apt source.list etc apt sources.list backup 編輯源位址 sudo gedit etc apt sources.list 更新命令 sudo apt get update sudo apt get dist upg...
ubuntu如何更新源
參考 開啟許可權 su備份源 cp etc apt sources.list etc apt sources.list.backup進入 etc apt路徑 cd etc apt編輯sources.list 檔案 gedit sources.list如圖 內容可能不同 到以下路徑複製清華的源 注意版...
ubuntu 更換更新源
貼上內容 1 備份原來的更新源 cp etc apt sources.list etc apt sources.list.backup 如果提示許可權不夠就輸入下面兩行,先進入到超級使用者,再備份 sudo s cp etc apt sources.list etc apt sources.list...