LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Howto install 32-bit libraries on 64-bit Linux using yum (https://www.linuxquestions.org/questions/linux-server-73/howto-install-32-bit-libraries-on-64-bit-linux-using-yum-505352/)

shawn_t 11-27-2006 05: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:
Code:

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 libstdc++.so.6. I tried the following command:
Code:

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

error while loading shared libraries: libstdc++.so.6: 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 05:38 PM

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

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 03:03 PM

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

if you have a missing library - for example:

Code:

libstdc++.so.5
do;

Code:

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

then you can do;

Code:

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

Jiggs224u 06-10-2011 07: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 10:01 AM

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

Code:

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

Thanks,

johnsfine 02-11-2012 10: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.

Quote:

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
packages.ubuntu.com 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 07:52 PM

Dag Weirs' site http(colon)(slash)(slash)dag.wieers.com/rpm/ 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.
cheers.

rogerp 06-26-2012 03:50 PM

My apologies, but I've tried and tried all of these suggestions and still cannot get a 32 bit version of libc.so to install on my 64 bit HR6 system. No matter what I install when I check /lib/libc.so - 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!
Roger

knudfl 06-26-2012 03: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 05:19 PM

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

[root@heather sarah]# yum install glibc.i686
Loaded plugins: refresh-packagekit, security
Setting up Install Process
Package glibc-2.12-1.47.0.2.el6_2.12.i686 already installed and latest version
Nothing to do
[root@heather sarah]#
[root@heather sarah]# file /lib/libc.so
/lib/libc.so: 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 06:16 PM

Quote:

he whatprovides should be more documented.
it is
see:
Code:

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

yum wp */libGL.so


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

yum search glibc

rogerp 06-27-2012 07:40 AM

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

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

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

Roger

johnsfine 06-27-2012 08:42 AM

You should not have a 64 bit libc.so 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 libc.so in /lib64 the same file or different or missing or what?

rogerp 06-27-2012 10:43 AM

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

The /lib64/libc.so looks to be the same file as the /lib/libc.so.

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

Roger

knudfl 06-27-2012 11:27 AM

# 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 01:41 AM.