![可升级但不能从 jammy-updates 和 jammy-security 升级](https://linux22.com/image/1199875/%E5%8F%AF%E5%8D%87%E7%BA%A7%E4%BD%86%E4%B8%8D%E8%83%BD%E4%BB%8E%20jammy-updates%20%E5%92%8C%20jammy-security%20%E5%8D%87%E7%BA%A7.png)
我已经从 20.04 升级到 22.04,并且有两个软件包处于“可升级”状态但尚未升级,它们似乎被保留了下来:
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
gcc-10-base gcc-10-base:i386
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
$ apt policy gcc-10-base
gcc-10-base:
Installed: 10.5.0-1ubuntu1~20.04
Candidate: 10.5.0-1ubuntu1~22.04
Version table:
10.5.0-1ubuntu1~22.04 500
500 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages
500 http://archive.ubuntu.com/ubuntu jammy-security/universe amd64 Packages
*** 10.5.0-1ubuntu1~20.04 100
100 /var/lib/dpkg/status
10.3.0-15ubuntu1 500
500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
您建议如何清理这个问题?
答案1
第一次运行:
sudo dpkg --configure -a
查看软件包是否已升级。
如果没有,请使用:
sudo dpkg -r gcc-10-base:i386
sudo dpkg --remove-architecture i386
sudo dpkg --configure -a
sudo apt update
sudo apt upgrade
如果启用了多架构,dpkg 可能会在版本升级期间卡住,并且gcc-10-base
将保持未配置状态。