Recently, when I ran "yum update" for some update, which will get an error as follow:

--> Processing Dependency: libstdc++.so.6 for package: pcre-8.32-17.el7.i686
---> Package zlib.i686 0:1.2.7-17.el7 will be installed
--> Running transaction check
---> 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 libstdc++ which is missing some
            dependency that another package requires. Yum is trying to
            solve this by installing an older version of libstdc++ 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 libstdc++.otherarch ... this should give you an error
            message showing the root cause of the problem.

         2. You have multiple architectures of libstdc++ 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 libstdc++ 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: libstdc++-4.8.5-16.el7.i686 != libstdc++-4.8.5-11.el7.x86_64
Error: Protected multilib versions: libgcc-4.8.5-16.el7.i686 != libgcc-4.8.5-11.el7.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-libelf-0.168-8.el7.i686 != elfutils-libelf-0.166-2.el7.x86_64
Error: Protected multilib versions: libcap-2.22-9.el7.i686 != libcap-2.22-8.el7.x86_64
Error: Protected multilib versions: libdb-5.3.21-20.el7.i686 != libdb-5.3.21-19.el7.x86_64
Error: Protected multilib versions: libgcrypt-1.5.3-14.el7.i686 != libgcrypt-1.5.3-13.el7_3.1.x86_64
Error: Protected multilib versions: elfutils-libs-0.168-8.el7.i686 != elfutils-libs-0.166-2.el7.x86_64
Error: Protected multilib versions: nss-softokn-freebl-3.28.3-8.el7_4.i686 != nss-softokn-freebl-3.16.2.3-14.4.el7.x86_64
Error: Protected multilib versions: libselinux-2.5-11.el7.i686 != libselinux-2.5-6.el7.x86_64

According to its notification, it seems like the system requires some system dependencies, which is *.i686.

Searching by this error, a lot of docs mentioned "just set protected_multilib=false in yum.conf"

But I am totally sure it is not required. I do not require *.i686, why do I have to install so much useless libs?

Checking the dependencies tree, we can find The Prime Evil:

---> Package rdma.noarch 0:7.3_4.7_rc2-6.el7_3 will be obsoleted
---> Package rdma-core.i686 0:13-7.el7 will be obsoleting
--> Processing Dependency: libudev.so.1(LIBUDEV_183) for package: rdma-core-13-7.el7.i686
--> Processing Dependency: libudev.so.1 for package: rdma-core-13-7.el7.i686
--> Processing Dependency: libc.so.6(GLIBC_2.16) for package: rdma-core-13-7.el7.i686
---> Package rdma-core.x86_64 0:13-7.el7 will be obsoleting

It seems like the architecture of rdma was changed. rdma.noarch was split to 2 packages: rdma-core.i686 and rdma-core.x86_64.

We can manually install rdma-core.x86_64 to replace the original rdma.noarch:

$ yum install rdma-core -y
Resolving Dependencies
--> Running transaction check
---> Package rdma.noarch 0:7.3_4.7_rc2-6.el7_3 will be obsoleted
---> Package rdma-core.x86_64 0:13-7.el7 will be obsoleting
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================
 Package                                         Arch         Version        Repository      Size
==================================================================================================
Installing:
 rdma-core                                       x86_64       13-7.el7       base            43 k
     replacing  rdma.noarch 7.3_4.7_rc2-6.el7_3

Transaction Summary
==================================================================================================
Install  1 Package

Total download size: 43 k
Downloading packages:
rdma-core-13-7.el7.x86_64.rpm                                                 |  43 kB  00:00:00
Running transaction check
Running transaction test
....

And then, we can do everything else.

----- Update -----

Sadly, why can't I found this note earlier...

Categories: Code

Yu

Ideals are like the stars: we never reach them, but like the mariners of the sea, we chart our course by them.

7 Comments

xqiushi · October 9, 2017 at 22:23

Google Chrome 61.0.3163.100 Google Chrome 61.0.3163.100 Windows 10 x64 Edition Windows 10 x64 Edition

我很少更新CentOS

    yu · October 10, 2017 at 15:44

    Google Chrome 61.0.3163.100 Google Chrome 61.0.3163.100 Mac OS X  10.12.6 Mac OS X 10.12.6

    @xqiushi Why don’t you use yum-cron

      xqiushi · October 12, 2017 at 04:53

      Google Chrome 61.0.3163.100 Google Chrome 61.0.3163.100 Windows 10 x64 Edition Windows 10 x64 Edition

      @yu 我怕更新不稳定

        yu · October 12, 2017 at 12:10

        Google Chrome 61.0.3163.100 Google Chrome 61.0.3163.100 Mac OS X  10.12.6 Mac OS X 10.12.6

        @xqiushi

        [commands]
        #  What kind of update to use:
        # default                            = yum upgrade
        # security                           = yum --security upgrade
        # security-severity:Critical         = yum --sec-severity=Critical upgrade
        # minimal                            = yum --bugfix upgrade-minimal
        # minimal-security                   = yum --security upgrade-minimal
        # minimal-security-severity:Critical =  --sec-severity=Critical upgrade-minimal
        update_cmd = default
        

        至少 minimal-security-severity:Critical 还是要的. 不然肉鸡决定就是你了

          xqiushi · October 14, 2017 at 21:23

          Google Chrome 61.0.3163.100 Google Chrome 61.0.3163.100 Mac OS X  10.13.1 Mac OS X 10.13.1

          @yu 那我试试看

Bob · October 3, 2018 at 09:13

Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition

Hello, suckers,

I did this:

for i in $(rpm -qa | grep i686); do rpm -e $i --nodeps; done
yum upgrade

and the shit turned to gold.
Have a nice day

    yu · October 3, 2018 at 13:40

    Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 GNU/Linux x64 GNU/Linux x64

    @Bob Dear Bob, thank you for your script. However, this special case is kind of different.

    In this case, the current package is rdma.noarch. And the next packages would be rdma-core.i686 and rdma-core.x86_64. rpm -e could not erase the packages have not installed yet.

Leave a Reply

Your email address will not be published. Required fields are marked *