E:Error,pkgProblemResolver :: Resolve生成的中断,这可能是由保留的软件包引起的


38

我不确定是什么导致了此错误,但是这就是整个错误的意思,这也是一个通知,它阻止我使用Update Manager更新任何软件-请提供帮助或告诉我如何确定修复它。

Could not calculate the upgrade

An unresolvable problem occurred while calculating the upgrade.

Please report this bug against the 'update-manager' package and include the following error message:
'E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.'

Answers:


19

这篇文章可以解决您的问题。总而言之,

  1. /var/log/dist-upgrade/apt.log在文本编辑器中打开日志文件。
  2. 找到所有“损坏的”软件包,然后使用删除它们。sudo apt-get remove <package>

注意:在较新的版本中,日志位于/var/log/apt/term.log


2
+1。工作完美。就我而言,我只是试图去删除一个pkg,这表明其他依赖于它的pkg也要被删除。这些pkg是特定于发行版的,而Ubuntu不知道其升级路径。
IsaacS 2012年

14
cat: /var/log/dist-upgrade/apt.log: No such file or directory
Braden Best

我试过了 我发现“这很可能意味着您的安装已损坏”文本,但不知道指的是什么包
。...– ScottF

/term.log中的@ScottFlog并尝试确定它要安装的内容。
派克勒

9

尝试:

sudo apt-get update && sudo apt-get upgrade

然后再次运行更新管理器。


1

该错误可能是由于软件包安装不完整引起的。

您有两种选择,1)修复损坏的安装,或2)回滚(或删除)损坏的安装。

由于上面没有提到,因此要回滚并删除损坏的安装,请退出突触(如果您仍在其中),然后在终端中输入以下命令:

sudo apt-get update       # Make sure your package list is up to date
sudo apt-get autoremove   # Removes "no longer required" packages

然后,确认损坏的软件包已消失,返回到突触并选择,Edit|。Fix broken packages而且应该没有破损的包装。

请注意,这不能解决损坏的安装问题,它仅允许您与其他安装或拆卸过程类似地再次突触。

发生的事情是,您开始安装软件包,然后进行部分安装,在安装了某些依赖项之后,出现了问题,留下了未使用的依赖软件包,并且安装不完整。


1

从16.04升级到18.04并在中间断电时出现此错误。

这就是错误的样子,而apt-get install -f不能修复它。

$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 gir1.2-gtk-3.0 : Depends: gir1.2-pango-1.0 (>= 1.40.5) but 1.38.1-1 is installed
                  Depends: libgtk-3-0 (>= 3.22.29) but 3.18.9-1ubuntu3.3 is installed
 hplip : Depends: hplip-data (= 3.17.10+repack0-5) but 3.16.3+repack0-1 is installed
         Depends: printer-driver-hpcups (= 3.17.10+repack0-5) but 3.16.3+repack0-1 is installed
         Depends: libsane1 (>= 1.0.24) but it is not installed
 libhpmud0 : Depends: libsnmp30 (>= 5.7.3+dfsg-1.8ubuntu3~dfsg) but 5.7.3+dfsg-1ubuntu4.2 is installed
 onboard : Depends: onboard-common (< 1.4.1-2ubuntu1.1) but it is not installed
           Depends: onboard-common (>= 1.4.1-2ubuntu1) but it is not installed
           Depends: libhunspell-1.6-0 but it is not installed
           Recommends: onboard-data (>= 1.4.1-2ubuntu1) but 1.2.0-0ubuntu5 is installed
 python3 : Depends: python3.6 (>= 3.6.7-1~) but it is not installed
           Depends: libpython3-stdlib (= 3.6.7-1~18.04) but 3.5.1-3 is installed
 python3-apt : Depends: libapt-inst2.0 (>= 1.6.5~) but 1.2.29ubuntu0.1 is installed
               Depends: libapt-pkg5.0 (>= 1.6.5~) but 1.2.29ubuntu0.1 is installed
 python3-cryptography : Depends: python3-asn1crypto (>= 0.21.0~) but it is not installed
                        Depends: python3-idna (>= 2.1) but 2.0-3 is installed
 python3-gdbm : Depends: libgdbm5 (>= 1.14) but it is not installed
 python3-pil : Depends: libwebp6 (>= 0.5.1) but it is not installed
               Depends: libwebpdemux2 (>= 0.5.1) but it is not installed
               Depends: libwebpmux3 (>= 0.6.1-2) but it is not installed
               Recommends: python3-olefile but it is not installed
 python3-systemd : Depends: libsystemd0 (>= 233) but 229-4ubuntu21.16 is installed
 python3-uno : Depends: libreoffice-core (= 1:6.0.7-0ubuntu0.18.04.2) but 1:5.1.6~rc2-0ubuntu1~xenial6 is installed
               Depends: python3.6 but it is not installed
               Depends: uno-libs3 (>= 5.3.0~alpha) but 5.1.6~rc2-0ubuntu1~xenial6 is installed
 python3.6-dev : Depends: python3.6 (= 3.6.7-1~18.04) but it is not installed
 totem-plugins : Depends: libgtk-3-0 (>= 3.19.4) but 3.18.9-1ubuntu3.3 is installed
                 Depends: liblirc-client0 but it is not installed
                 Depends: libtotem0 (>= 3.26.0-0ubuntu6.2) but 3.18.1-1ubuntu4 is installed
                 Depends: totem (= 3.26.0-0ubuntu6.2) but 3.18.1-1ubuntu4 is installed
                 Depends: gir1.2-totem-1.0 (= 3.26.0-0ubuntu6.2) but 3.18.1-1ubuntu4 is installed
 virtualbox : Depends: python3.6 but it is not installed
              Depends: libgsoap-2.8.60 but it is not installed
              Depends: libpng16-16 (>= 1.6.2-1) but it is not installed
              Recommends: libqt5core5a (>= 5.9.0~beta) but 5.5.1+dfsg-16ubuntu7.5 is installed
 virtualbox-qt : Depends: libqt5core5a (>= 5.9.0~beta) but 5.5.1+dfsg-16ubuntu7.5 is installed
                 Depends: libqt5widgets5 (>= 5.7.0) but 5.5.1+dfsg-16ubuntu7.5 is installed
                 Depends: libqt5x11extras5 (>= 5.6.0) but 5.5.1-3build1 is installed
E: Unmet dependencies. Try using -f.

我还尝试sudo apt-get remove了/var/log/dist-upgrade/apt.log中的软件包,但是也没有用。

这个为我工作

dpkg -l | grep ^iU | awk '{print $2}' | xargs sudo dpkg --purge 

它删除了破损的包裹,然后我跑了

 apt install -f

它下载并安装了软件包。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.