yum fails with Error: Protected multilib versions: package.i686 != package.x86_64
Environment
- Red Hat Enterprise Linux 6,7,8,9
Issue
- Unable to install multilib package; Yum gives the error: Protected multilib versions: package-2.x86_64 != package-1.i686
Resolution
There are numerous ways to encounter this issue. This occurs when yum is attempting to install different architectures, and different versions, of the same package.
Incomplete or missing repository
- Verify that the packages which you want to update are all available in the repository and at the same version
NOTE: Replace package
with any package names relevant to the error
# yum list "package*" --showduplicates
-
If you find "package" has a higher version then a similar "package-*"
- Satellite or local repositories, may not be fully sync'd
-
You need to enable a repository which provides the update for installed packages
- Identify what repository has the packages you need by searching the portal. Below are links for Red Hat Enterprise Linux Server x86_64
- RHEL 7 Package Search
- RHEL 6 Package Search
- RHEL 5 Package Search -
Most commonly RHEL 7 needs rhel-7-server-optional-rpms.
- Verify that you are not excluding packages
# grep exclude /etc/yum.conf
- If you are using the versionlock plugin, verify that the packages necessary to update are not being locked at a specific version
# yum versionlock list
- When registered with Red Hat Subscription Manager, if the system is locked to a minor release, that may be causing the issue
# subscription-manager release
Duplicate packages or missing dependencies
- Your system may have pre-existing rpm database problems. Verify with:
# package-cleanup --dupes
# package-cleanup --problems
- Resolve duplicate packages with How to remove duplicate packages from a failed yum transaction
Targeting specific versions
- If you install a package that is a different version, and architecture, then a package you already have installed.
# yum list package --showduplicates
- Install the intended package at the version matching what you already have installed
- Update the existing installed rpms before attempting to install the package
- If you already have installed different versions of different architectures, this will show as a duplicate in yum check output, but it is a protected multilib caused by forcing a package installation or by disabling protected_multilib.
- If the error is from yum installing a .i686 version that was not present before the update, ensure that all variants of that package (package-devel, package-static, package-libs, package-*) are being updated. Generally these versions all must match.
- If
package
is updated, butpackage-devel
is not, yum may pull inpackage.i686
as a dependency which creates the multilib error. The resolution is to update the-devel
package
- If you are still encountering a multilib error, please open a case with Red Hat Support
Root Cause
- Multilib means support for multiple architectures
- This issue arises when .x86_64 and .i686 packages are not the same version
- If both the 64 bit and the 32 bit version of a package are available in the repository, they must be the same version.
Diagnostic Steps
-
Verify your yum cache is up to date with the repo
-
# yum clean all
-
List out all the packages and check to see if everything is available that you need available
# yum list all --showduplicates
# yum list <package> --showduplicates
-
-
Verify there are no excludes or version locks applied to your system
# grep exclude /etc/yum.conf
# yum versionlock list
# subscription-manager release
-
Check for pre-existing problems in the rpm database
# yum check
# package-cleanup --dupes
# package-cleanup --problems
-
Rebuild the database with
rpm --rebuilddb
Removing the Conflicting Packages
- If only after you have run the yum clean commands and rebuilt the database and you are still receiving the issue, then the only other option is to remove the package forcefully. But please note: If the package has many core dependencies and its removed, then this could break the server and it would be very difficult to recover from. Therefore this option is not recommended, in this case seek Red Hat support
For non production servers, use this option at your own risk.
*Prerequisite: Ensure you have a dvd copy of the current version you are running.
How to create a dvd yum repository
Example of a real multilib issue:
$ yum update
Protected multilib versions: iptables-1.4.21-28.el7.x86_64 != iptables-1.4.21-24.1.el7_5.i686
Error: Protected multilib versions: 14:libpcap-1.5.3-11.el7.x86_64 != 14:libpcap-1.5.3-9.el7.i686
$ yum remove libpcap
This removed 40 packages that werent core to the server such as libvirt.
`$ yum remove iptables`, would remove too many core applications and services.
So to rectify this, we need to remove it without its dependencies.
First we list the packages. In this case, there was no packages with i686.
rpm -qa | egrep iptables
iptables-services-*
iptables-utils-*
Then we remove these packages without their dependencies and we have an understanding that these packages will not interfere with the rpm database, core applications like glibc, the network or yum.
rpm -e --justdb --nodeps iptables
rpm -e --justdb --nodeps iptables-services
rpm -e --justdb --nodeps iptables-utils
Then you should be able to run the command
$ yum update
The final test is
$ reboot
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments