yum update or yum install fails with package conflict between 64 bit and 32 bit package architectures ?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
    *Red Hat Enterprise Linux 7
  • 64 bit architecture
  • 32 bit packages installed sharing some files with the 64 bit ones

Issue

  • Files are conflicting between 64 and 32 bit packages, how to fix it ?
  • yum update or yum install fails with package conflict between 64 bit and 32 bit package architectures.
  • 32 bit package showing conflict problem with 64 bit package.
Transaction Check Error:
file /usr/share/man/man1/ca.1ssl.gz from install of openssl-0.9.8e-27.el5_10.3.x86_64 conflicts with file from package openssl-0.9.8e-27.el5_10.1.i686
file /usr/share/man/man1/req.1ssl.gz from install of openssl-0.9.8e-27.el5_10.3.x86_64 conflicts with file from package openssl-0.9.8e-27.el5_10.1.i686
file /usr/share/man/man1/x509.1ssl.gz from install of openssl-0.9.8e-27.el5_10.3.x86_64 conflicts with file from package openssl-0.9.8e-27.el5_10.1.i686

Resolution

You can configure the yum client to update only a package of the exact architecture installed on the system.

Perform the following steps to remove duplicate packages(i.e. 32-bit and 64-bit packages installed on server which is causing the dependency issues).

  1. Install the yum-utils package:

    # yum install yum-utils
    
  2. The package-cleanup --dupes lists all duplicate packages:

    # package-cleanup --dupes        
    
  3. The package-cleanup --cleandupes removes the duplicates (it asks for a confirmation to remove all duplicates unless the -y switch is given):

    # package-cleanup --cleandupes   
    
  4. Edit /etc/yum.conf, set the following line for Red Hat Enterprise Linux 5 and Red Hat Enterprise Linux 6:

    exactarch=1
    
  5. Edit /etc/yum.conf, set the following line for Red Hat Enterprise Linux 7:
exactarchlist=*
  1. Run yum command:

    # yum clean all
    # yum update
    

If the conflict is only due to the fact that yum isn't trying to update the 32 bit packages along with the 64 bit ones, this will solve the conflict.

Note: If all above procedure fail, you can also check your exclude content in /etc/yum.conf file. Sometimes 32Bits Packages are in the yum blacklist and system will prevent it to install and you will see the Transaction Check Error.

# grep -i exclude /etc/yum.conf
exclude=kernel*,*.i?86

Note 2: In case the systems cannot be connected to the internet for security reasons, one could replace the files with the rpm command as follow:

rpm -Uvh --replacefiles openssl-*.rpm

Root Cause

When encountering library specific rpm dependencies, architecture of the packages must be considered. As the error here was from a 32bit rpm failing, logically it would follow the the package to resolve that dependency must also be 32bit. A 64bit library version can't be utilized by a 32bit tool

Diagnostic Steps

Transaction Check Error:
  file /usr/include/libdevmapper-event.h from install of device-mapper-1.02.67-2.el5.i386 conflicts with file from package device-mapper-1.02.55-2.el5.x86_64
  file /usr/include/libdevmapper.h from install of device-mapper-1.02.67-2.el5.i386 conflicts with file from package device-mapper-1.02.55-2.el5.x86_64
  file /usr/share/man/man8/dmeventd.8.gz from install of device-mapper-1.02.67-2.el5.i386 conflicts with file from package device-mapper-1.02.55-2.el5.x86_64
  file /usr/share/man/man8/dmsetup.8.gz from install of device-mapper-1.02.67-2.el5.i386 conflicts with file from package device-mapper-1.02.55-2.el5.x86_64
  file /etc/odbcinst.ini from install of unixODBC-libs-2.2.11-10.el5.i386 conflicts with file from package unixODBC-2.2.11-7.1.x86_64
  file /usr/bin/passmass from install of expect-5.43.0-8.el5.i386 conflicts with file from package expect-5.43.0-5.1.x86_64
  file /usr/share/man/man1/expect.1.gz from install of expect-5.43.0-8.el5.i386 conflicts with file from package expect-5.43.0-5.1.x86_64
  file /etc/pki/tls/certs/Makefile from install of openssl-0.9.8e-22.el5_8.3.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.x86_64
  file /etc/pki/tls/certs/ca-bundle.crt from install of openssl-0.9.8e-22.el5_8.3.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.x86_64
  file /usr/share/man/man1/ca.1ssl.gz from install of openssl-0.9.8e-22.el5_8.3.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.x86_64
  file /usr/share/man/man1/req.1ssl.gz from install of openssl-0.9.8e-22.el5_8.3.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.x86_64
  file /usr/share/man/man1/x509.1ssl.gz from install of openssl-0.9.8e-22.el5_8.3.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.x86_64
  file /usr/share/ghostscript/8.70/Resource/Init/gs_fonts.ps from install of ghostscript-8.70-14.el5.i386 conflicts with file from package ghostscript-8.70-6.el5.x86_64
  file /usr/share/ghostscript/8.70/Resource/Init/gs_res.ps from install of ghostscript-8.70-14.el5.i386 conflicts with file from package ghostscript-8.70-6.el5.x86_64
  file /usr/share/ghostscript/8.70/lib/PDFA_def.ps from install of ghostscript-8.70-14.el5.i386 conflicts with file from package ghostscript-8.70-6.el5.x86_64
  file /usr/share/man/man1/gs.1.gz from install of ghostscript-8.70-14.el5.i386 conflicts with file from package ghostscript-8.70-6.el5.x86_64
  file /usr/share/man/man5/ldap.conf.5.gz from install of openldap-2.3.43-25.el5.i386 conflicts with file from package openldap-2.3.43-12.el5_5.3.x86_64

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.

9 Comments

Does not necessarily fix the issue.

This does not work in my situation. A solution is needed.

I install gcc.i686 and gcc.x86_64 ,It's ok!

package-cleanup --cleandupes is getting failed with dependencies. still need improvements in package-cleanup rpm. Probably will allow an option to skip dependencies with --nodeps.

It helped me to close issue.

Fix the issue for me. Not all steps were needed though. Just ran the following:

  1. # yum install yum-utils
  2. # package-cleanup --dupes
  3. # yum clean all
  4. # yum update

while it sometimes fixes stuff, the real question is why does it happen?

Why do we sometimes have duplicates in the rpm database, even different versions?
Does yum make wrong decisions at times?

I know other package managers when switching repos for instance will not update unless manually intervened. With that packagemanager I never have seen the mess like what I encounter nowadays. I do understand the root cause but not how it happens. (It should not happen) Tooling should prevent that (unless some idiot has used a --force option somewhere; in that case there are other counter-measures in place).

Not helping tofix

it did not fix the issue