我不确定是什么导致了这个错误,但这是整个错误所说的内容,这也是一个通知,阻止我使用更新管理器更新任何软件 - 请提供一些帮助或告诉我如何找出什么做修复它。
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.'
Run Code Online (Sandbox Code Playgroud)
Pyk*_*ler 25
这篇文章可能会解决您的问题。总结一下,
/var/log/dist-upgrade/apt.log在文本编辑器中打开日志文件。sudo apt-get remove <package>注意:在较新的版本中,日志位于/var/log/apt/term.log。
jlb*_*jlb 11
尝试:
sudo apt-get update && sudo apt-get upgrade
Run Code Online (Sandbox Code Playgroud)
然后再次运行更新管理器。
小智 6
我从 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.
Run Code Online (Sandbox Code Playgroud)
我也尝试sudo apt-get remove过 /var/log/dist-upgrade/apt.log 中的包,但也没有用。
这个对我有用
dpkg -l | grep ^iU | awk '{print $2}' | xargs sudo dpkg --purge
Run Code Online (Sandbox Code Playgroud)
它删除了损坏的包然后我跑了
apt install -f
Run Code Online (Sandbox Code Playgroud)
它下载并安装了软件包。
小智 5
对我来说,问题看起来像这样
The following packages have unmet dependencies.
libglib2.0-dev : Depends: libglib2.0-0 (= 2.64.2-1~fakesync1) but 2.64.3-1~ubuntu20.04.1 is to be installed
Depends: libglib2.0-bin (= 2.64.2-1~fakesync1)
Run Code Online (Sandbox Code Playgroud)
这是由于错误选择了我想要下载的更新类型造成的。我通过打开Software & Updates、选择Updates并确保我选择了All updates来修复它For other packages, subscribe to:。见下图
然后我运行通常的命令apt update && apt dist-upgrade,然后我就可以安装该库了。
昨天有人在操作系统版本升级期间重新启动后,我遇到了这个问题。由于混乱的规模(约 1500 个包),上述方法均无效。
为了恢复,我查看了/var/log/apt/history.log最后一个条目,其中有三个很长的列表,描述了操作系统升级失败时正在尝试的操作。它由三个列表“升级:”“安装:”“删除:”组成:
Upgrade: package1:arch (old, new), package2:arch (old, new),
...
Run Code Online (Sandbox Code Playgroud)
将这三个列表放入您最喜欢的正则表达式兼容编辑器中,并用换行符替换括号到逗号。对于“删除:”部分附加一个“-”,这样您就会留下如下列表:
Install:
speech-dispatcher-espeak-ng:amd64
fdisk:amd64
libgoa-backend-1.0-1:amd64
...
Upgrade:
speech-dispatcher-audio-plugins:amd64
ubuntu-settings:amd64
libmpc3:amd64
...
Remove:
qtdeclarative5-ubuntu-ui-toolkit-plugin:amd64-
python-sip:amd64-
gstreamer1.0-plugins-ugly-amr:amd64-
...
Run Code Online (Sandbox Code Playgroud)
“-”是一个关键的学习点,因为除非您可以告诉它安装和删除,否则您将无法克服许多依赖周期。
保留此文件的副本,以便以后参考,但在清理它的地方制作一个新副本:删除文件中所有多余的行,只留下这些行package:arch。
使用生成的文件 packages.txt 运行 apt,如下所示
xargs -a packages.txt sudo apt install
Run Code Online (Sandbox Code Playgroud)
该命令将是系统在损坏之前打算执行的所有添加/删除操作,并且应该代表一致的集合。
假设它完成,您就可以完成sudo apt install -f和错过的任何内容sudo apt dist-upgrade。
最后创建一个仅包含“安装:”软件包列表的新列表,将它们传递给将apt-mark auto软件包标记为自动安装(升级选择了它们,而不是您)。
xargs -a installed.txt sudo apt-mark auto
Run Code Online (Sandbox Code Playgroud)
我希望这可以帮助那些认为整个系统已经崩溃的人。
| 归档时间: |
|
| 查看次数: |
254020 次 |
| 最近记录: |