YUM multilib versions issue

Subscribe
Voiced by Amazon Polly

Yum multilib version errors

Recently I came across an issue when trying to updating a number of RHEL servers. After issuing the yum update command it would come back with an error stating a multilib version issue and could not proceed due to numerous protected multilib versions.

yum multilib protection error

The resolution

I first gathered some data that I could use, however in the end for this issue I only really needed the yum check command.  The others are still nice to have to look over if needed though.

Run the following commands to gather your rpm and yum results and have them stored in the /tmp directory.

# rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH} = %{VENDOR} = %{installtime} (%{installtime:date}) \n" | sort &>/tmp/rpmall.txt
# rpm -qa --queryformat "%{NAME}.%{ARCH}\n" | sort &>/tmp/rpmshort.txt
# yum check &> /tmp/yumcheck.txt
# rpm -Va &> /tmp/rpmva.txt

The first two command go quickly, the last one, particularly the yum check command will take some time to complete.  So just be patient.  It’s taken about 15 minutes at times on my servers to complete the command.

Once you have all your files you can issue the next two commands to check for duplicates in the yumcheck.txt file you created.

# grep "duplicate" /tmp/yumcheck.txt | awk '{ print $NF }' | egrep -v "\:" > /tmp/duplicaterpms-1.txt
# grep "duplicate" /tmp/yumcheck.txt | awk '{ print $NF }' | egrep ":" | awk -F':' '{ print $NF }' >> /tmp/duplicaterpms-1.txt

Next, you can run your final command which will clear out the duplicates and resolve your issue.

# rpm -e $(cat /tmp/duplicaterpms-1.txt) --justdb --nodeps

Finally, you can then issue the yum update command and you should have no further problems.

If you find that you only have one duplicate, or it shows in the yum check at the end of the failed yum update results you can run the rpm command with just a single library file.  To do so, run the following command (using libgcc as our example):

# rpm -e --justdb --nodeps libgcc-4.8.5-11.el7.x86_64

If you are having similar issues, I hope this post will be of some assistance to you.  It was a pain getting resolved to start with; however, following these steps servers that I come across with this issue are easily fixed.

On a side note, sometimes when running the rpm -e command you would get an error about a certain package, mine came back with “all” a few times.  I resolved this by editing the duplicatesrpms-1.txt file and finding the package it is complaining about and just dd’ing the line.

Cheers,

Ivan Windon – RHCSA

Share

Ivan Windon

Ivan Windon is a Senior Technical Support Engineer at Red Hat, where Ivan supports Red Hat Satellite. Ivan is actively engaged in Cloud Technologies with AWS, Google, and Azure. Ivan has extensive experience with Linux and Windows administration, DNS, Networking, IDM, and Security. In his free time, he enjoys being with his wife and two children. The family enjoys hiking, and traveling when able. His favorite locations are Yosemite NPS, and San Francisco, California.

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: