目前正處於尷尬的奇數年,ubuntu剛剛發佈了20.04 LTS,然鵝還是有不少用戶仍然在用19.04或者19.10,目前19.04的官方源已經被移動到old-release倉庫了,正常的apt使用都會出現問題,19.10目測7月份也要停止維護了,這篇文章記錄一下19.04如何恢復apt,以及後續的升級操作,原文:釘子戶Ubuntu-disco強制拆遷記錄
前言
我目前用的發行版還是Ubuntu 19.04
,這幾天在執行apt-get update
的時候突然報錯了:
% sudo apt update
Ign:1 http://security.ubuntu.com/ubuntu disco-security InRelease
Err:2 http://security.ubuntu.com/ubuntu disco-security Release
404 Not Found [IP: 91.189.91.38 80]
Ign:3 http://cn.archive.ubuntu.com/ubuntu disco InRelease
Ign:4 http://cn.archive.ubuntu.com/ubuntu disco-updates InRelease
Ign:5 http://cn.archive.ubuntu.com/ubuntu disco-backports InRelease
Err:6 http://cn.archive.ubuntu.com/ubuntu disco Release
404 Not Found [IP: 91.189.91.39 80]
Err:7 http://cn.archive.ubuntu.com/ubuntu disco-updates Release
404 Not Found [IP: 91.189.91.39 80]
Err:8 http://cn.archive.ubuntu.com/ubuntu disco-backports Release
404 Not Found [IP: 91.189.91.39 80]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu disco-security 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.
E: The repository 'http://cn.archive.ubuntu.com/ubuntu disco 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.
E: The repository 'http://cn.archive.ubuntu.com/ubuntu disco-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.
E: The repository 'http://cn.archive.ubuntu.com/ubuntu disco-backports 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.
從錯誤信息中不難猜出是19.04停止維護了,於是我去官方源看了一下:
果然19.04對應的版本disco
已經不在官方源中了,所以update
的時候會報404 Not Found
Err:2 http://security.ubuntu.com/ubuntu disco-security Release
404 Not Found [IP: 91.189.91.38 80]
百度了一下,原來Ubuntu 19.04在今年1月份就不在支持了。
“從今天(2020年1月23日)開始,不再支持Ubuntu 19.04。“Canonical解釋說,“不會再有軟件包更新到19.04,並且它將在未來幾周內存檔到old-releases.ubuntu.com。”
截止到4月份,也就是前幾天,官方纔把disco
的源正式刪掉,同時存檔到old-releases
多次勸說未果,遂強行搬家23333
這幾天在度娘和谷哥上根據下面這兩條報錯信息,搜了半天也沒解決
E: The repository 'http://security.ubuntu.com/ubuntu disco-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
各種換源、加trust等等解決方法都沒涉及到根本。。
後來自己思考了一下,404
錯誤是因爲沒找到disco
的源,原因是官方把disco
歸檔到old-releases
了,於是我去http://cn.old-released.archive.ubuntu.com/ubuntu/dists/找了找,果然看到了陣亡的disco
,於是解決方法就有了,把source.list
裏原先所有的源都改成old-released
的就可以了:
deb http://old-released.archive.ubuntu.com/ubuntu disco main
deb-src http://old-released.archive.ubuntu.com/ubuntu disco main
deb http://old-released.archive.ubuntu.com/ubuntu disco-updates main
deb-src http://old-released.archive.ubuntu.com/ubuntu disco-updates main
deb http://old-released.archive.ubuntu.com/ubuntu disco universe
deb-src http://old-released.archive.ubuntu.com/ubuntu disco universe
deb http://old-released.archive.ubuntu.com/ubuntu disco-updates universe
deb-src http://old-released.archive.ubuntu.com/ubuntu disco-updates universe
deb http://old-released.archive.ubuntu.com/ubuntu disco-security main
deb-src http://old-released.archive.ubuntu.com/ubuntu disco-security main
deb http://old-released.archive.ubuntu.com/ubuntu disco-security universe
deb-src http://old-released.archive.ubuntu.com/ubuntu disco-security universe
改完之後apt-get update
就正常了,不過這終歸不是長久之計,我最終還是乖乖的去升級19.10
了。。
對了20.04
貌似再過一個月就正式發佈了,到時候在更新一波叭。。
最後說一句…Ubuntu的奇數年是真的尷尬…
對了docker
的Ubnutu 19.04
應該也用不了了… 最近要用這個image的小夥伴兒們改用19.10
叭~
後記
好吧… eoan
不在支持gnome-open
了,據說是15年就沒人更新了,還出了不少bug,於是在19.10
中就把libgnome2-bin
這個包刪了… 用慣了gnome-open
,突然用不了了還真有點不習慣…
不過gnome-open
可以用這兩個命令替代
gvfs-open
gio open
功能差不多~