dnf 崩溃了,现在有交易错误

dnf 崩溃了,现在有交易错误

我在 Fedora 22 系统上运行dnf update,突然 Gnome 崩溃,导致 无法运行dnf。现在,当我再次尝试时,出现此错误:

The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction check error:
  file /usr/share/licenses/libpng/LICENSE from install of libpng-2:1.6.19-1.fc22.i686 conflicts with file from package libpng-2:1.6.16-3.fc22.x86_64
  file /usr/share/man/man5/png.5.gz from install of libpng-2:1.6.19-1.fc22.i686 conflicts with file from package libpng-2:1.6.16-3.fc22.x86_64
  file /usr/share/doc/libgpg-error/README from install of libgpg-error-1.21-1.fc22.i686 conflicts with file from package libgpg-error-1.17-2.fc22.x86_64
  [... many more ...]
  file /usr/share/doc/libgpg-error/AUTHORS from install of libgpg-error-1.21-1.fc22.i686 conflicts with file from package libgpg-error-1.17-2.fc22.x86_64
  file /usr/share/doc/pcre/NEWS from install of pcre-8.38-1.fc22.i686 conflicts with file from package pcre-8.37-4.fc22.x86_64
  file /usr/share/doc/pcre/ChangeLog from install of pcre-8.38-1.fc22.i686 conflicts with file from package pcre-8.37-4.fc22.x86_64

Error Summary
-------------

我如何强制dnf继续安装新版本?

答案1

看起来您有一个多库系统 — x86_64,同时还安装了 i686 软件包。通常,此类软件包会共享文件,只要它们完全相同,这就没有问题。似乎在这里,您更新了一个体系结构,但没有更新另一个体系结构,并且共享文件发生了更改。

最简单的解决方法是删除 i686 软件包。在这种情况下,

sudo dnf remove libpng.i686 libgpg-error.i686 pcre.i686

应该可以。它还可能会删除一堆 i686 依赖项,这没问题。您可以随时将它们放回去。执行此操作,然后升级,然后放回您真正需要的任何 32 位程序。

答案2

我曾经rpm强制升级,而不先删除 i686 软件包。dnf有助于将 RPM 文件保存在/var/cache/dnf/updates-<tx-id>/packages/

sudo rpm -i --force /var/cache/dnf/updates-<tx-id>/packages/<package>.rpm

相关内容