持有破损包裹

持有破损包裹

我尝试安装的一些东西给了我“持有损坏的包裹错误”,例如。麦克罗夫特(还有其他一些)

我尝试过通常的方法:

apt-get update, upgrade, dist-upgrade, autoremove & -f install

没有帮助。

我没有得到任何...

dpkg --get-selections | grep hold

运行 Synaptic fix broken packages,显示一切正常

尝试使用 Aptitude 强制安装,结果它想卸载我的整个操作系统,哈哈

另外,有些安装说我有 unment 依赖项,这些依赖项已经安装,甚至是请求的确切版本(例如libasound2-dev

没有主意了?还有其他方法可以修复损坏/被扣留的包裹吗?

Ubuntu 20.04

答案1

第一次尝试sudo apt autoclean

其次,尝试sudo apt remove版本错误的软件包,然后重新安装。或者简单地通过删除并重新安装列出的所有软件包来强制执行持有破损的包裹错误信息:

sudo apt-get install example

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:
 example : Depends: apple (= 7:4.2.2-1ubuntu1)
          Depends: banana (= 7:4.2.2-1ubuntu1) but it is not going to be installed
          Depends: cherry (= 7:4.2.2-1ubuntu1)
          Depends: lemon (= 7:4.2.2-1ubuntu1) but 7:4.2.4-1ubuntu0.1 is to be installed
          Depends: lime (= 7:4.2.2-1ubuntu1) but it is not going to be installed

删除并重新安装这些包。

sudo apt remove apple
sudo apt remove banana
sudo apt remove cherry
sudo apt remove lemon
sudo apt remove lime

sudo apt autoremove

sudo apt-get install example

相关内容