redhat – Fixing yum Upgrade Conflicts Between 32-bit and 64-bit Packages

centos7redhatupgradeyum

Our Red Hat 7.6 machines have 64-bit and 32-bit libraries installed.
I am scripting an update for all of our machines to run with our post-install scripts to upgrade all of the installed packages.
yum -y upgrade return many errors like this:
printers.pyc conflicts between libstdc++.i686 and libstdc++.x86_64
I have many of these errors on each machine. Each machine is different. I cannot just uninstall 32-bit the conflicting packages, upgrade and then re-install the 32-bit packages. There are just too many.

I've tried:
yum upgrade -x '*.i686' to no avail.

How can I overcome these errors en masse?

UPDATE:
Here is one of the error messages.

Transaction check error:
file */path/to/file/*printers.pyc conflicts between attempted installs of libstdc++-4.8.5-36.el7_6.2.i686 and libstdc++-4.8.5-36.el7_6.2.x86_64

Notice that I have the same version available for both 32 and 64 bit packages.
yum provides printers.pyc
Returns both the 32 and 64 bit packages as installed:

libstdc++-4.8.5-36.el7.i686 and libstdc++-4.8.5-36.el7.x86_64

Each machine is different. I cannot just uninstall the 32-bit libstdc++ and "call it good." Another machine will have different conflicts.

I need to script this. I have to deal with the entire set of installed RPMs, and just uninstall a few onsie-twosie packages.

Is it possible to upgrade ONLY the 64-bit packages first, the upgrade the 32s? Will that help?

Best Answer

yum wants thos library versions to match. libstdc++ for example will have to be installed with the exact same version number for both 32 and 64 bit.

Your proposition to remove the 32bit versions and then re-install them won't work; yum won't allow you to reinstall those 32bit versions if they don't match the exact same version number.

What happens is that probably there is an update available for libstdc++.x86_64 and not for libstdc++.i686 in your repositories.

There are multiple tactics possible to solve this:

  • try uninstalling your 32-bit packages (as proposed by @MichaelHampton)
  • investigate why you don't have an upgrade available for both versions (enabling/disabling repositories)
  • tell yum to ignore some packages when updating...