How to install 32-bit packages on a 64-bit CentOS

Rob asked:

We have a lot of 32-bit CentOS 6 servers with custom rpms built for i386 and i686 architectures in our own RPM repos.

We now have some 64-bit CentOS 6 servers, but would like to be able to install the 32-bit packages from the 32-bit repos.

I know that Debian supports “multiarch” that allows one to install 32-bit libraries and packages. What is the CentOS equivalent?

My answer:


The way all the major repos solve this is to actually copy the relevant 32-bit packages into the 64-bit repository. You can see this from a careful inspection of any such repo (CentOS, Fedora, etc.).

So, after you copy all the 32-bit packages to the 64-bit repo and re-run createrepo --update ... you should be able to install them. Since this can use a lot of space, I suggest hard linking them rather than copying them.

CentOS repository package listing


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.