-   Linux - Server (
-   -   Howto install 32-bit libraries on 64-bit Linux using yum (

shawn_t 11-27-2006 06:31 PM

Howto install 32-bit libraries on 64-bit Linux using yum
I am using CentOS 64-bit (version 4.3) and am running into problems where 32-bit libraries are not installed. I have encountered problems with VMWare and needed to install the 32-bit libraries for X11 using the following command:

yum install xorg-X11-libs.i386
Now, I am having a problem with a proprietary server that was built as a 32-bit application as it can't find I tried the following command:

yum install compat-libstdc++-33
but I still get the same error when I try to run our application:

error while loading shared libraries: cannot open shared object file: No such file or directory
Does anyone know how to find out what yum package to install to get the 32-bit version of libstdc++?

Also, can anyone tell me how to find the package to install for a generic library that is missing? I am anticipating that this problem will come up again so I'd like to learn how to determine which package to install if possible.

shawn_t 11-27-2006 06:38 PM

I found the command searching through some other forums. The following command will install the 32-bit versions of libstdc++:

yum install libstdc++.i386
Can anybody provide any information on how to do this in the generic case? I.E. if I encounter another missing library?

unkie888 02-23-2009 04:03 PM

I realise this is an ancient thread, but it could be useful to someone...

if you have a missing library - for example:



>yum whatprovides
compat-libstdc++-33.i386                3.2.3-61              fedora

then you can do;


yum install compat-libstdc++-33.i386
and your missing library will be installed.

Jiggs224u 06-10-2011 08:52 PM

I'm going to dig up an old thread... I was installing Ventrilo server on Fedora 15 64 bit and realized i couldn't install it due to missing libraries. I seen the file that was missing and I found it exactly by using the whatprovides command. That was amazing.. Anyways much thanks!

djgerbavore 02-11-2012 11:01 AM

I know this thread is old, but this saved me a lot of time. Thanks. I hope other people fun this useful.


yum whatprovides <libname>
The whatprovides should be more documented. I never heard of this until today. This might be yum's must kept secret.


johnsfine 02-11-2012 11:22 AM

I always use provides rather than whatprovides, because that is what I learned first and because I don't type very well. Maybe whatprovides is more intuitive, so easier to remember.


Originally Posted by djgerbavore (Post 4599746)
The whatprovides should be more documented. I never heard of this until today. This might be yum's must kept secret.

Unlike many important Linux tools, yum has a very beginner friendly man page. (what)provides is documented there both clearly and early (important for beginner friendly). In other tools some important beginner feature first mentioned on line 4000 of the man page "should be more documented". But that comment is unfair for whatprovides.

Nevertheless, for those too scared of man pages, I'm glad this thread exists.

For Debian based distributions, the corresponding apt functionality seems to be both not installed by default and harder to find in the documentation. I usually give up and instead go to and scroll down to Search the contents of packages. Odds are the package which contains fileX in Ubuntu is the same as the package which contains fileX in some other Debian based distribution, so that is an easy place to get the answer, especially if you're looking for the answer at a moment in which you can't run apt (such as while I'm on the Windows computer I'm using right now).

For some major Red Hat based distribution, if someone happens to knows of a similar (public web accessible) substitute for yum provides that would be a nice URL to have posted in this thread.

csbatoc 03-01-2012 08:52 PM

Dag Weirs' site http(colon)(slash)(slash) is an excellent source for RPM's for older Red Hats. Click on the Installation and Configuration link and look up your release and arch. for most there is a choice of yum or apt repositories.

rogerp 06-26-2012 04:50 PM

My apologies, but I've tried and tried all of these suggestions and still cannot get a 32 bit version of to install on my 64 bit HR6 system. No matter what I install when I check /lib/ - it is still 32 bit and the program which is dependent on it refuses to run.

Please, respond with details on how to download such a file. BTW, I can't find local.conf anywhere - I did a find / -name local.conf.

I also don't know how to change or add repositories - so if this requires some other repository - please indicate how to change or add the repository.

Thanks in advance!

knudfl 06-26-2012 04:58 PM

Post # 8, @rogerp : Welcome to LQ.

If it's RHEL 6 : The package name is "glibc.i686"

# yum install glibc.i686

rogerp 06-26-2012 06:19 PM

thanks, but ...
I appreciate your quick response and I tried it, with no success. I still don't have a 32 bit
Here is what happened:

[root@heather sarah]# yum install glibc.i686
Loaded plugins: refresh-packagekit, security
Setting up Install Process
Package glibc-2.12- already installed and latest version
Nothing to do
[root@heather sarah]#
[root@heather sarah]# file /lib/
/lib/ ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.4.0, not stripped
[root@heather sarah]#

John VV 06-26-2012 07:16 PM


he whatprovides should be more documented.
it is

man yum
and the output of the yum error
i am betting it stated to use "*/" in the search

yum wp */

are you trying to build software ?
if so you have to install the matching -devel package

yum search glibc

rogerp 06-27-2012 08:40 AM

I am trying to install SAS and getting this error message: "jre/bin/java: error while loading shared libraries: wrong ELF class: ELFCLASS64".

As I understand it /lib/ should be 32 bit and /lib64/ 64 bit. Or, at least, if it were then I could install SAS - which, appearantly, expects to find a 32 bit

So, how can I put a 32 bit in /lib?


johnsfine 06-27-2012 09:42 AM

You should not have a 64 bit in /lib in X86_64 RHEL. But you already know that.

I don't have any guess at how things got the way they are in your system, so I have no idea what corrective actions would be safe/effective.

Are the contents of /lib generally wrong? Or just that file?

Is in /lib64 the same file or different or missing or what?

rogerp 06-27-2012 11:43 AM

OK, somehow only got replaced - possibly when I was building the GCC compiler.

The /lib64/ looks to be the same file as the /lib/

So - how can I get this 32 bit file? Should not be too hard - right?


knudfl 06-27-2012 12:27 PM

# 14

CentOS 6.x
# yum reinstall glibc.i686 glibc-devel.i686

CentOS 4.x, 5.x
# yum reinstall glibc.i386 glibc-devel.i386


All times are GMT -5. The time now is 11:08 PM.