map*_*les 6 upgrade raspberrypi do-release-upgrade 21.10 22.04
我有一个运行 Ubuntu 21.10 的 Raspberry Pi,我最近了解到它已经停产了。不用担心,我会升级到下一个版本(幸运的是,这是一个 LTS 版本)...或者我是这么想的...
我想升级到 Ubuntu 22.04 LTS,但所有升级工具似乎都不起作用,这让我很困惑。
就上下文而言,我习惯于使用 Debian,您只需编辑apt.sources.list
和升级软件包即可。据我所知,对于 Ubuntu,首选的升级方法似乎是工具do-release-upgrade
。--actually-do-upgrade
但是,该工具没有在我的系统上执行任何操作(并且我没有找到任何像我丢失的命令行开关):
anthony@planetsrv:~$ sudo do-release-upgrade
Checking for a new Ubuntu release
Your Ubuntu release is not supported anymore.
For upgrade information, please visit:
http://www.ubuntu.com/releaseendoflife
Please install all available updates for your release before upgrading.
Run Code Online (Sandbox Code Playgroud)
它只是告诉我,我已停产 -我知道,这就是我尝试升级的原因!:) 该链接仅给出发布时间表;我没有看到任何有关从 EOL 版本升级的说明或提示。
运行时apt update
,我只收到 404 错误:
anthony@planetsrv:~$ sudo apt update
Ign:1 http://ports.ubuntu.com/ubuntu-ports impish InRelease
Ign:2 http://ports.ubuntu.com/ubuntu-ports impish-updates InRelease
Ign:3 http://ports.ubuntu.com/ubuntu-ports impish-backports InRelease
Ign:4 http://ports.ubuntu.com/ubuntu-ports impish-security InRelease
Err:5 http://ports.ubuntu.com/ubuntu-ports impish Release
404 Not Found [IP: 2620:2d:4000:1::19 80]
Err:6 http://ports.ubuntu.com/ubuntu-ports impish-updates Release
404 Not Found [IP: 2620:2d:4000:1::19 80]
Err:7 http://ports.ubuntu.com/ubuntu-ports impish-backports Release
404 Not Found [IP: 2620:2d:4000:1::19 80]
Err:8 http://ports.ubuntu.com/ubuntu-ports impish-security Release
404 Not Found [IP: 2620:2d:4000:1::19 80]
Reading package lists... Done
E: The repository 'http://ports.ubuntu.com/ubuntu-ports impish Release' no longer has 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://ports.ubuntu.com/ubuntu-ports impish-updates Release' no longer has 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://ports.ubuntu.com/ubuntu-ports impish-backports Release' no longer has 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://ports.ubuntu.com/ubuntu-ports impish-security Release' no longer has 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.
Run Code Online (Sandbox Code Playgroud)
apt upgrade
与:相同
anthony@planetsrv:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
libfwupdplugin1
Use 'sudo apt autoremove' to remove it.
The following packages will be upgraded:
apt apt-utils cloud-init gtk-update-icon-cache keyutils libapt-pkg6.0 libgtk-3-0 libgtk-3-bin libgtk-3-common libkeyutils1 libnss-systemd libpam-systemd librados2 librbd1 libsystemd0 libudev1
python3-distupgrade snapd systemd systemd-sysv systemd-timesyncd ubuntu-advantage-tools ubuntu-release-upgrader-core udev
24 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 41.2 MB of archives.
After this operation, 122 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://ports.ubuntu.com/ubuntu-ports impish-updates/main arm64 libnss-systemd arm64 248.3-1ubuntu8.6
404 Not Found [IP: 2620:2d:4000:1::19 80]
Err:2 http://ports.ubuntu.com/ubuntu-ports impish-updates/main arm64 libsystemd0 arm64 248.3-1ubuntu8.6
404 Not Found [IP: 2620:2d:4000:1::19 80]
Err:3 http://ports.ubuntu.com/ubuntu-ports impish-updates/main arm64 systemd-timesyncd arm64 248.3-1ubuntu8.6
...snipping repetitive similar lines, you get the idea :)...
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/s/systemd/libnss-systemd_248.3-1ubuntu8.6_arm64.deb 404 Not Found [IP: 2620:2d:4000:1::19 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/s/systemd/libsystemd0_248.3-1ubuntu8.6_arm64.deb 404 Not Found [IP: 2620:2d:4000:1::19 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/s/systemd/systemd-timesyncd_248.3-1ubuntu8.6_arm64.deb 404 Not Found [IP: 2620:2d:4000:1::19 80]
...snipping some more...
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Run Code Online (Sandbox Code Playgroud)
我遇到了这个问题,这表明软件包已移至old-releases.ubuntu.com
或us.archive.ubuntu.com
,但这些似乎都不适合我。我还遇到了这个问题,解决方案似乎是完全擦除并重新安装,我宁愿避免这样做。
这是我当前的sources.list
(删除评论):
deb http://ports.ubuntu.com/ubuntu-ports impish main restricted
deb http://ports.ubuntu.com/ubuntu-ports impish-updates main restricted
deb http://ports.ubuntu.com/ubuntu-ports impish universe
deb http://ports.ubuntu.com/ubuntu-ports impish-updates universe
deb http://ports.ubuntu.com/ubuntu-ports impish multiverse
deb http://ports.ubuntu.com/ubuntu-ports impish-updates multiverse
deb http://ports.ubuntu.com/ubuntu-ports impish-backports main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports impish-security main restricted
deb http://ports.ubuntu.com/ubuntu-ports impish-security universe
deb http://ports.ubuntu.com/ubuntu-ports impish-security multiverse
Run Code Online (Sandbox Code Playgroud)
我应该如何继续更新我的系统?我可以像在 Debian 中一样更新版本名称sources.list
,然后进行大升级吗?或者有什么办法可以让原来的工具(do-release-upgrade
)正常工作?
我弄清楚了服务器的问题old-releases
。
因为我使用的是 Raspberry Pi,并且在 ARM 架构上,所以我的sources.list
看起来像deb http://ports.ubuntu.com/ubuntu-ports/ impish main restricted
. 具体来说,请注意 URL 以 ubuntu- ports结尾。
在old-releases
服务器上,他们显然没有为端口和主要架构使用单独的目录。通过将我的sources.list
条目更新到http://old-releases.ubuntu.com/ubuntu/
,我能够获得 21.10 的最新更新。
在我弄清楚了 resources.list 后,我就能够apt update
运行apt upgrade
并do-release-upgrade
升级到 22.04。
注意:作为我系统的一部分apt upgrade
,安装了新内核。 我应该在此时重新启动,但没有。 我do-release-upgrade
立刻就跑了。版本升级尝试卸载旧的内核版本(当前正在运行的内核版本,已被apt update
替换),但抛出了一个大警告“您将要卸载当前正在运行的内核,您确定吗???” 。就我而言,我说“不”,并apt autoremove
在发布升级完成后重新启动后执行了操作。 我怀疑如果我在之后重新启动apt upgrade
,我就不会看到这个问题。
-ports
注2:升级工具似乎对您的架构很聪明,并在自动更新我的sources.list时为我重新添加了。