“以下软件包已被保留未升级”为什么?我该如何解决?

“以下软件包已被保留未升级”为什么?我该如何解决?

我有一些“未满足的依赖项”。我无法删除它们,也无法升级它们。我已经在 Google 上搜索并尝试了不少技巧(包括:'sudo apt-get --with-new-pkgs upgrade'、'sudo apt install包名称'、'sudo apt-get dist-upgrade'、sudo aptitude 然后 '+' 然后 'g g'..、sudo apt install -f 等等)但仍然没有运气!需要一些帮助。提前致谢。

    Calculating upgrade... Done
The following packages have been kept back:
  libdrm-amdgpu1 libdrm-amdgpu1:i386 libdrm-intel1 libdrm-intel1:i386 libdrm-nouveau2 libdrm-nouveau2:i386 libdrm-radeon1 libdrm-radeon1:i386
  libdrm2 libdrm2:i386
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.

sudo apt install libdrm-amdgpu1 libdrm-amdgpu1:i386 libdrm-intel1 libdrm-intel1:i386 libdrm-nouveau2 libdrm-nouveau2:i386 libdrm-radeon1 libdrm-radeon1:i386 libdrm2 libdrm2:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 libdrm-amdgpu1 : Breaks: libdrm-amdgpu1:i386 (!= 2.4.107-1028) but 2.4.105-3~20.04.2 is to be installed
 libdrm-amdgpu1:i386 : Breaks: libdrm-amdgpu1 (!= 2.4.105-3~20.04.2) but 2.4.107-1028 is to be installed
 libdrm-intel1 : Breaks: libdrm-intel1:i386 (!= 2.4.107-1028) but 2.4.105-3~20.04.2 is to be installed
 libdrm-intel1:i386 : Breaks: libdrm-intel1 (!= 2.4.105-3~20.04.2) but 2.4.107-1028 is to be installed
 libdrm-nouveau2 : Breaks: libdrm-nouveau2:i386 (!= 2.4.107-1028) but 2.4.105-3~20.04.2 is to be installed
 libdrm-nouveau2:i386 : Breaks: libdrm-nouveau2 (!= 2.4.105-3~20.04.2) but 2.4.107-1028 is to be installed
 libdrm-radeon1 : Breaks: libdrm-radeon1:i386 (!= 2.4.107-1028) but 2.4.105-3~20.04.2 is to be installed
 libdrm-radeon1:i386 : Breaks: libdrm-radeon1 (!= 2.4.105-3~20.04.2) but 2.4.107-1028 is to be installed
 libdrm2 : Breaks: libdrm2:i386 (!= 2.4.107-1028) but 2.4.105-3~20.04.2 is to be installed
 libdrm2:i386 : Breaks: libdrm2 (!= 2.4.105-3~20.04.2) but 2.4.107-1028 is to be installed
E: Unable to correct problems, you have held broken packages.

请看一下我的终端的屏幕截图。我正在使用 Ubuntu 20.04。

答案1

我已经解决了这个问题,通过删除所有 32 位应用程序及其架构,然后进行 dist-upgrade:

sudo aptitude purge `dpkg --get-selections | grep ":i386" | awk '{print $1}'
sudo dpkg --remove-architecture i386
sudo dpkg --print-foreign-architectures
sudo apt update && sudo apt upgrade && sudo apt dist-upgrade 

sudo apt-get purge ".*:i386"
sudo apt update && sudo apt upgrade && sudo apt dist-upgrade

尽管现在更新时出现了一个新的错误:

E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1683 (packagekitd)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to lock directory /var/lib/apt/lists/

sudo service packagekit restart所以每次更新我都必须运行,我不知道为什么!

相关内容