CentOS 7更新时出现Multilib version problems

简介: 这两天在更新CentOS7系统时,出现了Multilib version problems错误,执行命令:# yum update出现了的错误信息:....---> Package libcap-ng.

这两天在更新CentOS7系统时,出现了Multilib version problems错误,执行命令:

# yum update

出现了的错误信息:

....
---> Package libcap-ng.i686 0:0.7.5-4.el7 will be installed
---> Package libstdc++.i686 0:4.8.5-16.el7 will be installed
--> Finished Dependency Resolution
Error:  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 glibc which is missing some
            dependency that another package requires. Yum is trying to
            solve this by installing an older version of glibc 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 glibc.otherarch ... this should give you an error
            message showing the root cause of the problem.

         2. You have multiple architectures of glibc 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 glibc 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).

       Protected multilib versions: glibc-2.17-196.el7.i686 != glibc-2.17-157.el7_3.1.x86_64
Error: Protected multilib versions: pcre-8.32-17.el7.i686 != pcre-8.32-15.el7_2.1.x86_64
Error: Protected multilib versions: elfutils-libs-0.168-8.el7.i686 != elfutils-libs-0.166-2.el7.x86_64
......

解决过程如下:

//查询重复的软件包
# rpm -q systemd-libs
systemd-libs-219-30.el7.x86_64
systemd-libs-219-42.el7_4.1.x86_64

//删除旧版
# rpm -e systemd-libs-219-30.el7.x86_64
error: Failed dependencies:
    systemd-libs = 219-30.el7 is needed by (installed) libgudev1-219-30.el7.x86_64

//仍然出现依赖问题,继续查询libgudev1的版本信息
# rpm -q libgudev1
libgudev1-219-30.el7.x86_64

//发现只有一个版本,升级试一下
# yum update libgudev1
......
Updated:
  libgudev1.x86_64 0:219-42.el7_4.1                                                                                                                                                                                                                                             

Complete!
# rpm -q libgudev1
libgudev1-219-42.el7_4.1.x86_64

//升级完成后,删除旧版本的systemd-libs
# rpm -e systemd-libs-219-30.el7.x86_64
# rpm -q systemd-libs
systemd-libs-219-42.el7_4.1.x86_64

最后查询发现只剩下最新版本的systemd-libs,其他重复版本包的解决,也是同样的过程。
核心的命令主要是:

rpm -q package-names
rpm -e package-full-version
目录
相关文章
Centos 内核更新后缺少initramfs 导致无法启动
Centos 内核更新后缺少initramfs 导致无法启动
|
Linux 开发工具 git
CentOS 安装,更新 Git
查看 Linux 发行版名称和版本号,使用 yum 命令安装 git,默认安装的 Git 版本为 1.x 版本,而不是最新2.x。
766 0
CentOS 安装,更新 Git
|
存储 Linux PHP
CentOS 使用yum update 更新时保留特定版本的软件
有时需要保留特定版本的软件不升级,但升级其他软件,这时就需求用到下面的技巧。
395 0
|
Linux
大部分的线上机器都应该还没有更新到CentOS 7
CentOS 7将ifconfig,netstat等原来常用的命令也干掉了,用ip,lsof替换是更加好的工具,但是大部分的线上机器都应该还没有更新到CentOS 7
121 0
|
Web App开发 Linux
CentOS 7 镜像更新
信息摘要: CentOS 7 镜像更新适用客户: CentOS用户版本/规格功能: 镜像ID:centos_7_06_64_20G_alibase_20190218.vhd 内核版本:3.10.0-957.
8325 0