我已将台式计算机从 Ubuntu 20.04 升级到 22.04。这导致了与libnih
未满足的依赖关系相关的问题。错误消息如下:
The following packages have unmet dependencies:
libnih-dbus-dev : Depends: libnih-dbus1 (= 1.0.3-12build1) but 1.0.3-6ubuntu2 is to be installed
Depends: libnih-dev (= 1.0.3-12build1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
和:
dpkg: error processing archive /var/cache/apt/archives/libnih-dbus1_1.0.3-12build1_amd64.deb (--unpack):
package libnih-dbus1:amd64 (1.0.3-12build1) with field 'Multi-Arch: no' is not co-installable with libnih-dbus1 which has multiple installed instances
dpkg: error processing archive /var/cache/apt/archives/libnih1_1.0.3-12build1_amd64.deb (--unpack):
package libnih1:amd64 (1.0.3-12build1) with field 'Multi-Arch: no' is not co-installable with libnih1 which has multiple installed instances
我不清楚如何修复这个问题。我试过apt --fix-broken install
手动删除和更新软件包,但没有成功。我该如何解决这个问题?
答案1
最有帮助的答案是用户 jfs 发表的评论。他提到了一个类似的问题,并提到了在哪里可以找到答案
升级到 22.04 后 libnih-dbus1:amd64 和 libnih1:amd64 更新错误
https://bugs.launchpad.net/ubuntu/+source/libnih/+bug/1948346
sudo apt purge libnih1:i386 libnih-dbus1:i386 && sudo apt upgrade -y
我尝试了这个,虽然不太清楚这个命令实际上起什么作用,但它确实有效。