Knowledgebase
Knowledgebase
Protected multilib versions error when updating with yum
Posted by Will Kruss on 23 November 2020 09:39 AM

If you receive an error about protected multilib versions chances are that a reinstall of the latest package is required to force an update without breaking any packages.

Here is an example trying to update. Firstly, it finds an update, but says it's already installed and does not reinstall it.

yum update glib2

--> Running transaction check
---> Package glib2.x86_64 0:2.56.1-5.el7 will be updated
---> Package glib2.x86_64 0:2.56.1-8.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================
Updating:
glib2 x86_64 2.56.1-8.el7 updates 2.5 M

Transaction Summary
=====================================================================================================================================
Upgrade 1 Package

Total download size: 2.5 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
glib2-2.56.1-8.el7.x86_64.rpm | 2.5 MB 00:00:00
Running transaction check
Running transaction test


Transaction check error:
package glib2-2.56.1-8.el7.x86_64 is already installed

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

 

Now you can try to reinstall, but will likely receive a multilib error:

[root@vps ~]# yum reinstall glib2
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.swin.edu.au
* extras: ftp.swin.edu.au
* updates: ftp.swin.edu.au
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
--> Running transaction check
---> Package glib2.x86_64 0:2.56.1-8.el7 will be an update
---> Package glib2.x86_64 0:2.56.1-8.el7 will be erased
--> 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 glib2 which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of glib2 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 glib2.otherarch ... this should give you an error
message showing the root cause of the problem.

2. You have multiple architectures of glib2 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 glib2 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: glib2-2.56.1-8.el7.x86_64 != glib2-2.56.1-5.el7.x86_64

 

In this case you then need grab the latest version from the multilib output and reinstall it (in the above case "glib2-2.56.1-8.el7.x86_64"):

yum reinstall glib2-2.56.1-8.el7.x86_64

--> Running transaction check
---> Package glib2.x86_64 0:2.56.1-5.el7 will be updated
---> Package glib2.x86_64 0:2.56.1-8.el7 will be an update
---> Package glib2.x86_64 0:2.56.1-8.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================
Updating:
glib2 x86_64 2.56.1-8.el7 updates 2.5 M
Removing:
glib2 x86_64 2.56.1-8.el7 installed 12 M

Transaction Summary
=====================================================================================================================================
Upgrade 1 Package
Remove 1 Package

Total size: 2.5 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : glib2-2.56.1-8.el7.x86_64 1/3
Cleanup : glib2.x86_64 2/3
Verifying : glib2-2.56.1-8.el7.x86_64 1/2
Verifying : glib2-2.56.1-5.el7.x86_64 2/2
Verifying : glib2-2.56.1-8.el7.x86_64 3/2

Removed:
glib2.x86_64 0:2.56.1-8.el7

Updated:
glib2.x86_64 0:2.56.1-8.el7

Complete!

 

The package is now updated properly and without any errors when rechecking using yum update.

 

 

(0 vote(s))
Helpful
Not helpful