ubuntu版本很老,apt-get update更新失敗時(W: Failed to fetch ...)------如何創建新的sources.list

在說這個解決方案之前,我先說下,目前遇到的問題:

我使用 sudo apt-get update 之後,更新失敗。具體原因如下:

W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/karmic/main/binary-i386/Packages.gz  404  Not Found [IP: 180.101.150.32 80]


意思是:上面的這個文件(Packages.gz)無法找到!   我通過打開網頁http://cn.archive.ubuntu.com/ubuntu/  然後按照上面的目錄挨個查找,確實沒有這個文件!   (原因是我用的ubuntu是非常老的,所以要獲取新的sources.list





在這個網站創建新的sources.list

http://repogen.simplylinux.ch/


1. 選擇國家
2.選擇相鄰的ubuntu版本

3.選擇"Ubuntu Branches" ,源碼可以不用選擇。


4. 生成sources.list
5. 把得到內容替換到/etc/apt/sources.list

6. sudo apt-get update




更新之後又遇到了一個問題:

W: There is no public key available for the following key IDs: 3B4FE6ACC0B21F32

解決方案:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32

After this, run sudo apt-get update and make sure no other warnings/errors appear.


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章