运行 22.04 更新管理器(软件更新程序)后,单击升级会显示“正在检查新的 Ubuntu 版本,请在升级前安装适用于您版本的所有可用更新。”然而,sudo apt update
已经运行导致
Hit:1 http://se.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://se.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://se.archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Hit:5 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy InRelease
Fetched 110 kB in 1s (213 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
并sudo apt upgrade
导致
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
#
# News about significant security updates, features and services will
# appear here to raise awareness and perhaps tease /r/Linux ;)
# Use 'pro config set apt_news=false' to hide this and future APT news.
#
The following packages have been kept back:
libapache2-mod-php7.4 libapache2-mod-php8.0
0 to upgrade, 0 to newly install, 0 to remove and 2 not to upgrade.
我该如何解决这种情况才能升级到 22.10?
full-upgrade 显示有 5 个软件包被保留。因此我遵循了以下建议:
libapache2-mod-php7.4:
Installed: 7.4.29-1+ubuntu21.10.1+deb.sury.org+1
Candidate: 8.1.2-1ubuntu2.8
Version table:
8.1.2-1ubuntu2.8 500
500 http://se.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages
500 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages
8.1.2-1ubuntu2 500
500 http://se.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
*** 7.4.29-1+ubuntu21.10.1+deb.sury.org+1 100
100 /var/lib/dpkg/status
~$ ```
---
Asked to show the full result for apt full-upgrade, I ran '
sudo apt 完全升级
again. This time the result was different, but trying to run upgrade to 22.10 gave the same result
<pre>../Upload$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
#
# News about significant security updates, features and services will
# appear here to raise awareness and perhaps tease /r/Linux ;)
# Use 'pro config set apt_news=false' to hide this and future APT news.
#
The following packages have been kept back:
libapache2-mod-php7.4 libapache2-mod-php8.0 libnfsidmap1
The following packages will be upgraded:
firmware-sof-signed rsync
2 to upgrade, 0 to newly install, 0 to remove and 3 not to upgrade.
Need to get 1 223 kB of archives.
After this operation, 1 168 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://se.archive.ubuntu.com/ubuntu jammy-updates/main amd64 rsync amd64 3.2.3-8ubuntu3.1 [404 kB]
Get:2 http://se.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 firmware-sof-signed all 2.0-1ubuntu4 [819 kB]
Fetched 1 223 kB in 0s (3 769 kB/s)<font color="#CDCD00"> </font>
(Reading database ... 288644 files and directories currently installed.)
Preparing to unpack .../rsync_3.2.3-8ubuntu3.1_amd64.deb ...
Unpacking rsync (3.2.3-8ubuntu3.1) over (3.2.3-8ubuntu3) ...
Preparing to unpack .../firmware-sof-signed_2.0-1ubuntu4_all.deb ...
Unpacking firmware-sof-signed (2.0-1ubuntu4) over (2.0-1ubuntu3) ...
Setting up firmware-sof-signed (2.0-1ubuntu4) ...
Setting up rsync (3.2.3-8ubuntu3.1) ...
Processing triggers for man-db (2.10.2-1) ...
.../Upload$ sudo update-manager
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
.../Upload$</pre>
So I can still not upgrade to 22.10.
答案1
我发现问题 675876/cant-install-some-packages-depends-x-but-x-is-to-be-installed 的答案很有用。
降级 libapache2-mod-php8.0 后,sudo apt install php8.1-common=8.1.2-1ubuntu2.8
我可以升级所有其他软件包。然后毫无问题地开始升级到 22.10。