![pacman 问题:“错误:无法准备交易”](https://linux22.com/image/162159/pacman%20%E9%97%AE%E9%A2%98%EF%BC%9A%E2%80%9C%E9%94%99%E8%AF%AF%EF%BC%9A%E6%97%A0%E6%B3%95%E5%87%86%E5%A4%87%E4%BA%A4%E6%98%93%E2%80%9D.png)
尝试更新我的包数据库:
$ sudo pacman -Syu
[sudo] password for pietrom:
:: Synchronizing package databases...
core is up to date
extra 1770.5 KiB 259K/s 00:07 [######################################] 100%
community 5.3 MiB 150K/s 00:36 [######################################] 100%
multilib is up to date
:: Starting full system upgrade...
warning: fontconfig: local (2:2.13.91+23+g65087ac-1) is newer than extra (2:2.13.1+12+g5f5ec56-2)
warning: lib32-systemd: local (243.9-1) is newer than multilib (242.135-1)
warning: python-pip: local (19.2.3-1.4) is newer than extra (19.2.3-1)
warning: systemd: local (243.9-1) is newer than core (242.135-1)
warning: systemd-libs: local (243.9-1) is newer than core (242.135-1)
warning: systemd-sysvcompat: local (243.9-1) is newer than core (242.135-1)
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing pamac-common (9.0.0-3) breaks dependency 'pamac-common<9.0.0' required by pamac-qt
除了有关已安装的较新版本的警告之外,最后一个错误是什么以及如何修复?
我试图更新的是我的 LLVM/clang 版本(从 8 到 9),但我无法使用 Pacman 进行更新。
答案1
pacman
告诉您它无法更新系统,因为它无法在不破坏依赖关系的情况下更新包。
您安装了一个名为 的软件包pamac-qt
。该包被列为“实验性的”和它与 pamac 9 API 不兼容。您需要将其替换为pamac-gtk
.
这应该可以解决您的问题:
pacman -S pamac-gtk
pacman -R pamac-qt
答案2
解决此问题的最佳解决方案是手动删除所有损坏的依赖项,然后重新运行sudo pacman -Syu
命令。有用!
答案3
删除该包及其所有依赖包:
sudo pacman -Runcs <package-name>
然后您可以更新系统并根据需要重新安装软件包。
-u, --unneeded remove unneeded packages
-n, --nosave remove configuration files
-c, --cascade remove packages and all packages that depend on them
-s, --recursive remove unnecessary dependencies