ubuntu 19.04 disco apt-get update 時報錯 The repository xxx does not have a Release file

目前正處於尷尬的奇數年,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的奇數年是真的尷尬…

From https://ubuntu.com/about/release-cycle

對了dockerUbnutu 19.04應該也用不了了… 最近要用這個image的小夥伴兒們改用19.10叭~

後記

好吧… eoan不在支持gnome-open了,據說是15年就沒人更新了,還出了不少bug,於是在19.10中就把libgnome2-bin這個包刪了… 用慣了gnome-open,突然用不了了還真有點不習慣…

不過gnome-open可以用這兩個命令替代

  • gvfs-open
  • gio open

功能差不多~

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