July 19, 2012

64 Bit CentOS Installing 32 Bit Packages

When you do a fresh install of x86_64 CentOS 5, you might be surprised and annoyed to find yum trying to install 32 bit packages on your 64 bit server. You’ve got a 64 bit processor and operating system so why is it trying to install these un-needed 32 bit packages?

CentOS comes with multilib support, since your 64 bit processor can run 32 bit binaries, yum sees no issues with having 32 bit and 64 bit packages installed at the same time. If you look at a repo for x86_64 you’ll even see a bunch of i686 packages available to the x86_64 release. It seems like a feature most people would never need but a good example of when you’d want to install a 32 bit package on a 64 bit OS is to get something like flash support which only has a 32 bit package. I’ve also seen some RPMs get released exclusively as 32 bit packages.

This problem only happens on CentOS 5 because yum defaults to [code]multilib_policy=all[/code] which means ‘install all available architectures of packages’. This was changed in CentOS 6 to default to [code]multilib_policy=best[/code] which means ‘install the best packages for my architecture’ which on x86_64 means it will install x86_64 packages unless the packages is only available in a 32 bit format.

To fix this problem on CentOS 5, you need to add [code]multilib_policy=best[/code] to your yum.conf. You can optionally remove all the i386, i686, and other 32 bit friends with [code]yum remove *.i386 *.i486 *.i586 *.i686[/code] but be careful since you might actually need one of those 32 bit packages.

CentOS has an entry in their FAQ about how to deal with this although I don’t like their solution since it will exclude all 32 bit RPMs, including ones that you might end up needing some day. It will also cause problems with your updates if you add it on a server that already has a bunch of 32 bit RPMs installed since yum will no longer be able to update them.


Power up your sites and stores with custom-built technology designed to make every aspect of the digital commerce experience better. Make your digital commerce experience better with Nexcess.

We use cookies to understand how you interact with our site, to personalize and streamline your experience, and to tailor advertising. By continuing to use our site, you accept our use of cookies and accept our Privacy Policy.