首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从Ubuntu 21.10升级树莓Pi

从Ubuntu 21.10升级树莓Pi
EN

Ask Ubuntu用户
提问于 2022-08-11 17:38:07
回答 2查看 859关注 0票数 6

我有一个Raspberry Pi运行Ubuntu21.10,这是我最近了解到的EOL。不用担心,我只是升级到下一个版本(很高兴,它是一个LTS发行版).或者我是这么想的。

我想升级到Ubuntu22.04LTS,但是所有的升级工具似乎都不起作用,这让我非常困惑。

对于上下文,我习惯于使用Debian,在这里您只需编辑apt.sources.list和升级包。据我所见,在Ubuntu中,升级的首选方法似乎是do-release-upgrade工具。但是,该工具没有在我的系统上执行任何操作(而且我还没有找到任何类似于--actually-do-upgrade的命令行开关):

代码语言:javascript
复制
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.

它只是告诉我我是EOL --我知道,这就是我试图升级的原因!:) 链接只是给出了发布时间表;我没有看到任何关于从EOL版本升级的说明或提示。

在运行apt update时,我只得到404个错误:

代码语言:javascript
复制
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.

apt upgrade也是如此:

代码语言:javascript
复制
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?

我偶然发现了这个问题,这表明包已经转移到了old-releases.ubuntu.comus.archive.ubuntu.com,但它们似乎都不适合我。我还遇到了这个问题,其中的分辨率似乎是一个完整的擦除和重新安装,我宁愿避免。

下面是我当前的sources.list (去掉评论):

代码语言:javascript
复制
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

如何继续更新我的系统?我是否可以像在Debian中一样更新我的sources.list中的发行版名称,并以这种方式进行大的升级?或者是否有任何方法可以使原始工具(do-release-upgrade)正常工作?

EN

回答 2

Ask Ubuntu用户

回答已采纳

发布于 2022-08-15 03:12:43

我发现了我与old-releases服务器的问题。

因为我使用的是树莓Pi,在ARM架构上,我的sources.list看起来像deb http://ports.ubuntu.com/ubuntu-ports/ impish main restricted。特别要注意的是,URL以ubuntu-端口结尾。

old-releases服务器上,它们显然不使用单独的目录来处理端口和主架构。通过将sources.list条目更新为http://old-releases.ubuntu.com/ubuntu/,我能够获得21.10的最新更新。

在我弄明白了sources.list之后,我就可以使用apt updateapt upgrade了,而在那个时候,do-release-upgrade能够运行并将我升级到22.04。

注意:作为我系统上apt upgrade的一部分,安装了一个新内核。此时我应该重新启动,但没有。我刚开始运行do-release-upgrade。版本升级试图卸载旧版本的内核(当前正在运行的版本,apt update替换了该版本),但发出了一个警告:“您即将卸载当前运行的内核,您确定吗??”。在我的例子中,我说了“不”,并且在版本升级完成后重新启动后做了一个apt autoremove。我怀疑如果我在apt upgrade__之后重新启动,我就不会看到这个问题了。

注意2:升级工具似乎对您的体系结构很聪明,并且在它自动更新我的-ports时为我重新添加了这个sources.list。

票数 6
EN

Ask Ubuntu用户

发布于 2022-09-08 19:49:38

让您的Ubuntu更新的最佳方法应该是(作为一个命令,以便在最后一个命令之后自动执行)。

sudo apt更新& sudo apt完全升级& sudo apt自动删除

希望这能有所帮助

否则

数多apt列表--可升级& sudo apt升级

也应该起作用。不知道这是不是你想要的,我的ubuntu ^^有点生疏了

票数 -1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1423118

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档