windows崩了之后,為了方便就直接安裝了ubuntu,版本是18.04.2 LTS。
最近發(fā)現(xiàn)使用命令
sudo apt update
會報錯:
yzt@yzt-N65S01:~/Downloads$ sudo apt update
Hit:1 http://ftp.sjtu.edu.cn/ubuntu bionic InRelease
Hit:2 http://ftp.sjtu.edu.cn/ubuntu bionic-updates InRelease
Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:4 http://ftp.sjtu.edu.cn/ubuntu bionic-backports InRelease
Hit:5 http://ftp.sjtu.edu.cn/ubuntu bionic-security InRelease
Hit:6 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:7 http://dl.google.com/linux/chrome/deb stable Release
Ign:9 http://us.archive.ubuntu.com/ubuntu artful-updates InRelease
Err:10 http://us.archive.ubuntu.com/ubuntu artful-updates Release
404 Not Found [IP: 2001:67c:1562::19 80]
Reading package lists... Done
E: The repository 'http://us.archive.ubuntu.com/ubuntu artful-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
網(wǎng)上查了半天也沒解決,一開始以為是ubuntu技術(shù)支持時間到期了,因為ubuntu對每個版本的系統(tǒng)有一個支持時間,時間到了相應(yīng)的庫就不再原來的位置了,所以會出現(xiàn)404 Not Found。
但是我的系統(tǒng)才裝了不到一個月,我覺得不可能技術(shù)支持到期,所以去官網(wǎng)看了一下,發(fā)現(xiàn)這個版本的系統(tǒng)技術(shù)支持到2023年4月,現(xiàn)在離到期還早。
后面根據(jù)
E: The repository 'http://us.archive.ubuntu.com/ubuntu artful-updates Release' does not have a Release file.
這段話去查了一下,都說是軟件源的問題,可是我改了好幾個軟件源(中科院、阿里等)都不行,改完之后依然會報這個錯誤。
所以我就從這個錯誤著手,直接到http://us.archive.ubuntu.com/ubuntu這個網(wǎng)站上去看了一下,發(fā)現(xiàn)根本沒有art-updates這個文件,看來問題就在這兒。
百度上搜這個出現(xiàn)的全是各個鏡像站存儲的該文件的地址,但是點進去發(fā)現(xiàn),都沒有這個東東。而且這個東西肯定是之前有過但是后來不知道怎么就沒了,所以每個鏡像站都有它的地址但是都沒有存這個東西,所以sudo apt update的時候會報錯does not have a Release file。
解決方案(并不一定治本,因為我也不知道何謂本):將/etc/apt/sources.list中這段話注釋掉:
deb http://us.archive.ubuntu.com/ubuntu/ artful-updates main
然后就不報錯了。
至于art-updates為什么突然沒有了的原因我也沒有搞清楚,搜也搜不到,關(guān)鍵是我連這個東西是干嘛的都不知道,所以這個問題只能到此為止了。