目前正处于尴尬的奇数年,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
对了docker
的Ubnutu 19.04
应该也用不了了… 最近要用这个image的小伙伴儿们改用19.10
叭~
好吧… eoan
不在支持gnome-open
了,据说是15年就没人更新了,还出了不少bug,于是在19.10
中就把libgnome2-bin
这个包删了… 用惯了gnome-open
,突然用不了了还真有点不习惯…
不过gnome-open
可以用这两个命令替代
gvfs-open
gio open
功能差不多~