我在两台机器上执行了从 20.04 到 22.04 LTS 的升级do-release-upgrade
。两台机器都通过了。
现在我看到它们上面有不同的旧包装:
apt list --installed | grep 20.04
g++-11/now 11.4.0-2ubuntu1~20.04 amd64 [installed,local]
gcc-11-base/now 11.4.0-2ubuntu1~20.04 amd64 [installed,local]
gcc-11/now 11.4.0-2ubuntu1~20.04 amd64 [installed,local]
gcc-13-base/now 13.1.0-8ubuntu1~20.04.2 amd64 [installed,local]
gcc-13-base/now 13.1.0-8ubuntu1~20.04.2 i386 [installed,local]
libasan6/now 11.4.0-2ubuntu1~20.04 amd64 [installed,local]
libatomic1/now 13.1.0-8ubuntu1~20.04.2 amd64 [installed,local]
libatomic1/now 13.1.0-8ubuntu1~20.04.2 i386 [installed,local]
libcc1-0/now 13.1.0-8ubuntu1~20.04.2 amd64 [installed,local]
libgcc-11-dev/now 11.4.0-2ubuntu1~20.04 amd64 [installed,local]
libgcc-s1/now 13.1.0-8ubuntu1~20.04.2 amd64 [installed,local]
libgcc-s1/now 13.1.0-8ubuntu1~20.04.2 i386 [installed,local]
libgcc1/now 1:13.1.0-8ubuntu1~20.04.2 amd64 [installed,local]
libgomp1/now 13.1.0-8ubuntu1~20.04.2 amd64 [installed,local]
libitm1/now 13.1.0-8ubuntu1~20.04.2 amd64 [installed,local]
liblsan0/now 13.1.0-8ubuntu1~20.04.2 amd64 [installed,local]
libmbim-glib4/jammy-updates,now 1.28.0-1~ubuntu20.04.1 amd64 [installed,automatic]
libmbim-proxy/jammy-updates,now 1.28.0-1~ubuntu20.04.1 amd64 [installed,automatic]
libquadmath0/now 13.1.0-8ubuntu1~20.04.2 amd64 [installed,local]
libstdc++-11-dev/now 11.4.0-2ubuntu1~20.04 amd64 [installed,local]
libstdc++6/now 13.1.0-8ubuntu1~20.04.2 amd64 [installed,local]
libstdc++6/now 13.1.0-8ubuntu1~20.04.2 i386 [installed,local]
libtsan0/now 11.4.0-2ubuntu1~20.04 amd64 [installed,local]
libubsan1/now 13.1.0-8ubuntu1~20.04.2 amd64 [installed,local]
linux-generic-hwe-20.04/jammy-updates,now 5.15.0.83.80 amd64 [installed]
另一台机器的容量要小得多:
libmbim-glib4/jammy-updates,now 1.28.0-1~ubuntu20.04.1 amd64 [installed]
libmbim-proxy/jammy-updates,now 1.28.0-1~ubuntu20.04.1 amd64 [installed]
linux-generic-hwe-20.04/now 5.15.0.82.91~20.04.40 amd64 [installed,local]
linux-headers-generic-hwe-20.04/now 5.15.0.82.91~20.04.40 amd64 [installed,local]
linux-image-generic-hwe-20.04/now 5.15.0.82.91~20.04.40 amd64 [installed,local]
- 这是个问题吗?我尝试安装 rstudio,它在第二台机器上运行良好,但由于不兼容,在第一台机器上失败了
sudo apt install -f ./rstudio-2023.06.2-561-amd64.deb
:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libobjc-11-dev : Depends: gcc-11-base (= 11.4.0-1ubuntu1~22.04) but 11.4.0-2ubuntu1~20.04 is to be installed
Depends: libgcc-11-dev (= 11.4.0-1ubuntu1~22.04) but 11.4.0-2ubuntu1~20.04 is to be installed
E: Unable to correct problems, you have held broken packages.
所以我猜测至少对于第一台机器来说这是一个问题。
- 我该如何解决这个问题?也许可以简单地删除一些旧软件包(例如未使用的 Linux 标头等),但如何将 gcc 等升级到 22.04?