dnf 错误 i686 和 x86_64 之间的软件包冲突

dnf 错误 i686 和 x86_64 之间的软件包冲突

我收到一系列与此类似的错误

file /usr/share/doc/glibc/NEWS from install of glibc-2.25-10.fc26.i686 conflicts with file from package glibc-2.25-7.fc26.x86_64

当我尝试时dnf update,当我做任何事情时都会出现Python异常dnf install。这些是同时出现的新错误,可能与我昨天在工作中遇到的电源故障有关dnf update,尽管历史日志似乎表明它已经完成,但有一些错误,停电了。

当前的完整错误dnf update

Error: Transaction check error:
  file /usr/share/doc/glibc/NEWS from install of glibc-2.25-10.fc26.i686 conflicts with file from package glibc-2.25-7.fc26.x86_64
  file /usr/share/man/man1/xmlwf.1.gz from install of expat-2.2.4-1.fc26.i686 conflicts with file from package expat-2.2.1-1.fc26.x86_64
  file /usr/share/doc/sqlite-libs/README.md from install of sqlite-libs-3.20.1-1.fc26.i686 conflicts with file from package sqlite-libs-3.19.3-1.fc26.x86_64
  file /usr/share/doc/gdk-pixbuf2/NEWS from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/cs/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/de/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/es/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/fr/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/fur/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/gl/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/hu/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/id/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/kk/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/lt/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/pl/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/pt_BR/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/sl/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/sr/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/sr@latin/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/sv/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/locale/tr/LC_MESSAGES/gdk-pixbuf.mo from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/man/man1/gdk-pixbuf-query-loaders.1.gz from install of gdk-pixbuf2-2.36.9-1.fc26.i686 conflicts with file from package gdk-pixbuf2-2.36.7-1.fc26.x86_64
  file /usr/share/doc/libidn2/README.md from install of libidn2-2.0.4-1.fc26.i686 conflicts with file from package libidn2-2.0.2-1.fc26.x86_64
  file /usr/share/doc/libidn2/NEWS from install of libidn2-2.0.4-1.fc26.i686 conflicts with file from package libidn2-2.0.2-1.fc26.x86_64
  file /usr/share/info/libidn2.info.gz from install of libidn2-2.0.4-1.fc26.i686 conflicts with file from package libidn2-2.0.2-1.fc26.x86_64
  file /usr/share/man/man1/idn2.1.gz from install of libidn2-2.0.4-1.fc26.i686 conflicts with file from package libidn2-2.0.2-1.fc26.x86_64
  file /usr/share/man/man5/cert8.db.5.gz from install of nss-3.32.0-1.1.fc26.i686 conflicts with file from package nss-3.30.2-1.1.fc26.x86_64
  file /usr/share/man/man5/cert9.db.5.gz from install of nss-3.32.0-1.1.fc26.i686 conflicts with file from package nss-3.30.2-1.1.fc26.x86_64
  file /usr/share/man/man5/key3.db.5.gz from install of nss-3.32.0-1.1.fc26.i686 conflicts with file from package nss-3.30.2-1.1.fc26.x86_64
  file /usr/share/man/man5/key4.db.5.gz from install of nss-3.32.0-1.1.fc26.i686 conflicts with file from package nss-3.30.2-1.1.fc26.x86_64
  file /usr/share/man/man5/pkcs11.txt.5.gz from install of nss-3.32.0-1.1.fc26.i686 conflicts with file from package nss-3.30.2-1.1.fc26.x86_64
  file /usr/share/man/man5/secmod.db.5.gz from install of nss-3.32.0-1.1.fc26.i686 conflicts with file from package nss-3.30.2-1.1.fc26.x86_64
  file /usr/share/man/man5/k5identity.5.gz from install of krb5-libs-1.15.1-25.fc26.i686 conflicts with file from package krb5-libs-1.15.1-17.fc26.x86_64
  file /usr/share/man/man5/k5login.5.gz from install of krb5-libs-1.15.1-25.fc26.i686 conflicts with file from package krb5-libs-1.15.1-17.fc26.x86_64
  file /usr/share/man/man5/krb5.conf.5.gz from install of krb5-libs-1.15.1-25.fc26.i686 conflicts with file from package krb5-libs-1.15.1-17.fc26.x86_64
  file /usr/share/doc/wine-core/AUTHORS from install of wine-core-2.15-1.fc26.i686 conflicts with file from package wine-core-2.12-1.fc26.x86_64
  file /usr/share/doc/wine-core/VERSION from install of wine-core-2.15-1.fc26.i686 conflicts with file from package wine-core-2.12-1.fc26.x86_64
  file /usr/share/doc/wine-core/ANNOUNCE from install of wine-core-2.15-1.fc26.i686 conflicts with file from package wine-core-2.12-1.fc26.x86_64
  file /usr/share/doc/pango/NEWS from install of pango-1.40.11-3.fc26.i686 conflicts with file from package pango-1.40.7-1.fc26.x86_64
  file /usr/share/man/man1/pango-view.1.gz from install of pango-1.40.11-3.fc26.i686 conflicts with file from package pango-1.40.7-1.fc26.x86_64
  file /usr/share/doc/gtk3/README from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/doc/gtk3/NEWS from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/cs/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/de/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/es/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/fi/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/fr/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/fur/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/gl/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/hr/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/id/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/kk/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/lt/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/ne/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/pl/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/pt_BR/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/sk/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/sl/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/sr/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/locale/sr@latin/LC_MESSAGES/gtk30.mo from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/man/man1/broadwayd.1.gz from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/man/man1/gtk-launch.1.gz from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/man/man1/gtk-query-immodules-3.0.1.gz from install of gtk3-3.22.19-1.fc26.i686 conflicts with file from package gtk3-3.22.17-2.fc26.x86_64
  file /usr/share/doc/libsoup/NEWS from install of libsoup-2.58.2-1.fc26.i686 conflicts with file from package libsoup-2.58.1-2.fc26.x86_64
  file /usr/share/doc/libgusb/NEWS from install of libgusb-0.2.11-1.fc26.i686 conflicts with file from package libgusb-0.2.10-1.fc26.x86_64
  file /usr/share/doc/p11-kit/NEWS from install of p11-kit-0.23.8-1.fc26.i686 conflicts with file from package p11-kit-0.23.5-3.fc26.x86_64
  file /usr/share/man/man1/trust.1.gz from install of p11-kit-0.23.8-1.fc26.i686 conflicts with file from package p11-kit-0.23.5-3.fc26.x86_64
  file /usr/share/man/man5/pkcs11.conf.5.gz from install of p11-kit-0.23.8-1.fc26.i686 conflicts with file from package p11-kit-0.23.5-3.fc26.x86_64
  file /usr/share/man/man8/p11-kit.8.gz from install of p11-kit-0.23.8-1.fc26.i686 conflicts with file from package p11-kit-0.23.5-3.fc26.x86_64

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

错误来自dnf install [anything]

Last metadata expiration check: 0:15:05 ago on Tue 05 Sep 2017 11:09:50 AEST.
Traceback (most recent call last):
  File "/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 115, in cli_run
    cli.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 962, in run
    return self.command.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/install.py", line 120, in run
    self.base.install(pkg_spec, strict=strict, forms=forms)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 1582, in install
    subj._is_arch_specified(self.sack):
  File "/usr/lib/python3.6/site-packages/dnf/subject.py", line 71, in _is_arch_specified
    q = self._nevra_to_filters(sack.query(), nevra)
  File "/usr/lib/python3.6/site-packages/dnf/subject.py", line 49, in _nevra_to_filters
    query._filterm(*flags, **{name + '__glob': attr})
  File "/usr/lib/python3.6/site-packages/dnf/query.py", line 93, in _filterm
    return super(Query, self)._filterm(*args, **nargs)
AttributeError: 'super' object has no attribute '_filterm'

结束时的错误dnf history info 52(断电前的更新):

Scriptlet output:
   1 warning: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-5.b01.fc26.x86_64/jre/lib/security/java.security created as /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-5.b01.fc26.x86_64/jre/lib/security/java.security.rpmnew
   2 error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
   3 error: cannot open Packages index using db5 -  (-30969)
   4 error: cannot open Packages database in /var/lib/rpm
   5 error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
   6 error: cannot open Packages index using db5 -  (-30969)
   7 error: cannot open Packages database in /var/lib/rpm
   8 error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
   9 error: cannot open Packages index using db5 -  (-30969)
  10 error: cannot open Packages database in /var/lib/rpm
  11 error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
  12 error: cannot open Packages index using db5 -  (-30969)
  13 error: cannot open Packages database in /var/lib/rpm
  14 restored /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-5.b01.fc26.x86_64/jre/lib/security/java.security.rpmnew to /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-5.b01.fc26.x86_64/jre/lib/security/java.security

答案1

导致此错误的最典型原因是尝试在所有内容均未更新的情况下安装软件包。这有时会导致引入新的依赖项,与磁盘上已有的包发生冲突,并且 dnf 不知道它应该更新那些原本不相关的包。

就您而言,这似乎是另一回事,因为您在运行更新时看到了问题。不过,这里的错误肯定是不同体系结构中的可用版本和已安装版本之间不同步。例如:

file /usr/share/doc/glibc/NEWS from install of 
    glibc-2.25-10.fc26.i686 conflicts with file from package 
    glibc-2.25-7.fc26.x86_64

添加换行符使这一点变得显而易见:它正在尝试安装较新的 i686 软件包,但不知道要更新较旧的 glibc。

我要检查的第一件事是查看您是否安装了 x86_64 glibc 的多个版本。如果是这样,请运行sudo dnf repoquery --duplicates查看额外的版本,并dnf remove --duplicates进行清理。 (这将保留属于最新软件包的文件,因此即使它尝试删除看起来很重要的东西也是安全的。)

如果情况并非如此,则可能只是您现在使用的镜像不如之前获得的镜像更新。在这种情况下,请尝试sudo dnf clean all再次更新。

如果不起作用,您通常可以通过暂时删除所有 i686 软件包来解决此问题。系统将在没有它们的情况下运行,然后您可以进行更新,然后放回与 32 位应用程序兼容所需的内容。

如果您仍然遇到数据库错误,则可能在 RPM 级别遇到不同的问题 - 但请从上述开始。

答案2

dnf --installroot=/mnt/fedora我通过从实时 USB 启动并使用;克服了 Python 异常。包冲突不断出现,包括我尝试dnf remove --duplicates甚至尝试逐一删除包时出现的错误。所以我最终决定系统无法修复,并重新安装了 Fedora - 最后还开始设置 snapper,以便下次发生类似情况时可以轻松修复。

相关内容