CentOs 7 上的多库版本问题

CentOs 7 上的多库版本问题

当我尝试使用 更新 YUM 时sudo yum update --exclude=kernel*,python* --skip-broken,我Multilib version problems发现了。受保护的多库版本:

systemd-libs-219-30.el7_3.7.x86_64!=systemd-libs-219-30.el7_3.6.i686

我该如何解决这个问题?我有 CentOS 7.3,我的架构是 x86_64。

Fout:  Multilib version problems found. This often means that the root
      cause is something else and multilib version checking is just
      pointing out that there is a problem. Eg.:

        1. You have an upgrade for systemd-libs which is missing some
           dependency that another package requires. Yum is trying to
           solve this by installing an older version of systemd-libs of the
           different architecture. If you exclude the bad architecture
           yum will tell you what the root cause is (which package
           requires what). You can try redoing the upgrade with
           --exclude systemd-libs.otherarch ... this should give you an error
           message showing the root cause of the problem.

        2. You have multiple architectures of systemd-libs installed, but
           yum can only see an upgrade for one of those architectures.
           If you don't want/need both architectures anymore then you
           can remove the one with the missing update and everything
           will work.

        3. You have duplicate versions of systemd-libs installed already.
           You can use "yum check" to get yum show these errors.

      ...you can also use --setopt=protected_multilib=false to remove
      this checking, however this is almost never the correct thing to
      do as something else is very likely to go wrong (often causing
      much more problems).

      Beschermde multilib-versies: systemd-libs-219-30.el7_3.7.x86_64!=systemd-libs-219-30.el7_3.6.i686

答案1

Yum 抱怨说您系统中 systemd-libs 的 64 位和 32 位版本的 RPM 不匹配。

您将看到它的版本是 219-30.el7_3。7适用于 x86_64(64 位)和版本 219-30.el7_3。6适用于 i686 (32 位)。

您可以使用以下命令检查系统中每个体系结构的软件包版本:

$ rpm -q systemd-libs
systemd-libs-219-30.el7_3.6.i686
systemd-libs-219-30.el7_3.7.x86_64

看看那里是否存在一些异常,例如,i686 有两个版本的 systemd-libs...

如果版本匹配,那么问题可能是 yum 正在尝试升级 x86_64 版本,但忽略了 i686 版本。

--skip-broken如果软件包的 i686 版本以某种方式对 yum 造成“损坏”,则有可能您以某种方式触发了此问题...

您的系统也可能已重新配置为仅考虑 64 位软件包,而不再尝试安装(或维护)32 位软件包......

您可以尝试使用 yum-utils 包中的某些实用程序来解决这个问题。

你能安装它吗?

$ sudo yum install yum-utils

如果发生这种情况,请尝试使用此命令来完成被中断的 yum 事务(这可能首先导致了问题):

$ sudo yum-complete-transaction

您也可以使用package-cleanup命令。例如,如果您似乎有重复的软件包(为 32 位软件包安装了多个版本),请尝试以下操作:

$ sudo package-cleanup --cleandupes

我希望这有帮助!

答案2

yum list installed | grep systemd-libs
yum update systemd-libs.i686
yum reinstall systemd-libs.x86_64

然后重启系统

答案3

首先尝试:

yum install systemd-libs

进而

yum update --exclude=kernel*,python* --skip-broken

答案4

我遇到了类似的问题并通过删除几个包的重复版本解决了它:

package-cleanup --dupes

然后从 rdmdb 中删除所有较新的版本

rpm -e --justdb --nodeps <package-version>

然后yum upgrade再次工作并安装所有待处理的升级。

相关内容