LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-15-2014, 01:15 PM   #1
CowboyRT
LQ Newbie
 
Registered: Jan 2014
Posts: 7

Rep: Reputation: Disabled
Error while loading shared libraries - wrong ELF class: ELFCLASS32


I am currently running CentOS 6.5 64-bit. I am attempting to install a 32-bit application and I'm getting the error below during the application install.

error while loading shared libraries: libc.so.6: wrong ELF class: ELFCLASS32

/tmp/eiecho: error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory.

/tmp/eipath: error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory.

------
# ldd /tmp/eiecho
linux-gate.so.1 => (0x00bac000)
libicuuc.so.20 => not found
libicui18n.so.20 => not found
libicudata.so => not found
libm.so.6 => /lib/libm.so.6 (0x00bcd000)
libdl.so.2 => /lib/libdl.so.2 (0x00d95000)
libc.so.6 => /lib/libc.so.6 (0x005c8000)
/lib/ld-linux.so.2 (0x005a6000)

# ldd /tmp/eipath
linux-gate.so.1 => (0x00a62000)
libicuuc.so.20 => not found
libicui18n.so.20 => not found
libicudata.so => not found
libm.so.6 => /lib/libm.so.6 (0x00215000)
libdl.so.2 => /lib/libdl.so.2 (0x00fa7000)
libc.so.6 => /lib/libc.so.6 (0x005c8000)
/lib/ld-linux.so.2 (0x005a6000)

# find / -name "libc.so.6" -print
/lib64/libc.so.6
/lib/libc.so.6
/lib/i686/nosegneg/libc.so.6

# find / -name "libm.so.6" -print
/lib64/libm.so.6
/lib/libm.so.6
/lib/i686/nosegneg/libm.so.6

#ls -l /lib64/libc.so.6 /lib/libc.so.6/ lib/i686/nosegneg/libc.so.6

lrwxrwxrwx. 1 root root 12 Jan 13 13:55 /lib64/libc.so.6 -> libc-2.12.so
lrwxrwxrwx. 1 root root 12 Jan 14 15:41 /lib/i686/nosegneg/libc.so.6 -> libc-2.12.so
lrwxrwxrwx. 1 root root 17 Jan 14 19:27 /lib/libc.so.6 -> /lib/libc-2.12.so
lrwxrwxrwx. 1 root root 12 Jan 13 13:55 /lib64/libc.so.6 -> libc-2.12.so
lrwxrwxrwx. 1 root root 12 Jan 14 15:41 /lib/i686/nosegneg/libc.so.6 -> libc-2.12.so
lrwxrwxrwx. 1 root root 17 Jan 14 19:27 /lib/libc.so.6 -> /lib/libc-2.12.so

#ls -l /lib64/libm.so.6 /lib/libm.so.6 /lib/i686/nosegneg/libm.so.6

lrwxrwxrwx. 1 root root 12 Jan 13 13:55 /lib64/libm.so.6 -> libm-2.12.so
lrwxrwxrwx. 1 root root 12 Jan 14 15:41 /lib/i686/nosegneg/libm.so.6 -> libm-2.12.so
lrwxrwxrwx. 1 root root 17 Jan 14 19:26 /lib/libm.so.6 -> /lib/libm-2.12.so
lrwxrwxrwx. 1 root root 12 Jan 13 13:55 /lib64/libm.so.6 -> libm-2.12.so
lrwxrwxrwx. 1 root root 12 Jan 14 15:41 /lib/i686/nosegneg/libm.so.6 -> libm-2.12.so
lrwxrwxrwx. 1 root root 17 Jan 14 19:26 /lib/libm.so.6 -> /lib/libm-2.12.so

# find / -name "libm-2.12.so" -print
/lib64/libm-2.12.so
/lib/libm-2.12.so
/lib/i686/nosegneg/libm-2.12.so

# ls -l /lib64/libm-2.12.so /lib/libm-2.12.so /lib/i686/nosegneg/libm-2.12.so

-rwxr-xr-x. 1 root root 599384 Nov 21 16:38 /lib64/libm-2.12.so
lrwxrwxrwx. 1 root root 18 Jan 14 15:41 /lib/i686/nosegneg/libm-2.12.so -> ../../libm-2.12.so
-rwxr-xr-x. 1 root root 200024 Nov 21 16:13 /lib/libm-2.12.so

# find / -name "libc-2.12.so" -print
/lib64/libc-2.12.so
/lib/libc-2.12.so
/lib/i686/nosegneg/libc-2.12.so

#ls -l /lib64/libc-2.12.so /lib/libc-2.12.so /lib/i686/nosegneg/libc-2.12.so

-rwxr-xr-x. 1 root root 1926800 Nov 21 16:38 /lib64/libc-2.12.so
-rwxr-xr-x. 1 root root 1923588 Nov 21 16:13 /lib/i686/nosegneg/libc-2.12.so
-rwxr-xr-x. 1 root root 1910572 Nov 21 16:13 /lib/libc-2.12.so

Thank you in advance for all assistance and responses.

Last edited by CowboyRT; 01-15-2014 at 01:16 PM.
 
Old 01-16-2014, 07:16 AM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
I think your libc is the incorrect architecture for the program you're installing.
 
Old 01-16-2014, 07:35 AM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
It doesn't fit or explain the error messages you posted, but I think you should start by finding and installing the 32-bit RPMs that contain the three .so files reported by ldd as not found.

You should also use the file command on the relevant files to try to find the explanation for the error messages you posted:
Code:
file -L /tmp/eiecho
file -L /lib/libm.so.6
etc.

Quote:
Originally Posted by CowboyRT View Post
I am attempting to install a 32-bit application and I'm getting the error below during the application install.
Does this installer recompile the application from source? And if so, what about the application is "32-bit".

The error messages you posted seem unlikely for most situations. One situation that fits those error messages is an application designed to recompile during install, but using build scripts that are incompatible with a 64-bit RH based distribution (maybe it wouldn't recompile correctly on any 64-bit distribution, or maybe it recompiles correctly as a 64-bit application on Debian based distributions but not RH based).

If that is the case, there is someplace (such as an environment variable) where you can inject the -m32 option to make it recompile as 32-bit instead of recompiling (as I'm guessing it does now) as broken 64-bit. Without more details of what the installer is doing, I don't want to make many guesses about how to put in the -m32. In the simplest cases that would be done by using the command
Code:
export CCFLAGS=-m32
before launching the installer (from the same shell in which you did that export). But many installers are different and could require a different way to inject -m32 (or I might be entirely wrong in my guess that anything is getting compiled).

Last edited by johnsfine; 01-16-2014 at 07:52 AM.
 
Old 01-16-2014, 02:19 PM   #4
CowboyRT
LQ Newbie
 
Registered: Jan 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks AwesomeMachine and johnsfine.. Is this looking like a library issue? I got the same resuls on CentosOS 6.5 32bit when installing the application. The commands below are output from the 6.5 32 bit server.

# file -L /tmp/eiecho
/tmp/eiecho: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped

# file -L /lib/libm.so.6
/lib/libm.so.6: ELF 32-bit LSB shared object, Intel 80386, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped

Last edited by CowboyRT; 01-16-2014 at 02:35 PM. Reason: clarify
 
Old 01-16-2014, 02:24 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
You have installed the necessary 32-bit libraries on your 64-bit system, yes? It looks from your finds that you have, but just making sure.

Code:
yum install glibc.i686
and any others you might need.

Last edited by suicidaleggroll; 01-16-2014 at 02:27 PM.
 
Old 06-24-2014, 12:00 PM   #6
CowboyRT
LQ Newbie
 
Registered: Jan 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
AwesomeMachine was correct. It was the wrong architecture of libraries and the incorrect version of libraries.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
lmutil: error while loading shared libraries: libgcc_s.so.1: wrong ELF class: ELFCLAS calamari81 Linux - Software 2 07-23-2013 06:13 AM
[SOLVED] unixODBC driver - wrong ELF class: ELFCLASS32 (SQL-01000) andrux Programming 2 08-23-2011 09:58 AM
wrong ELF class: ELFCLASS32 wilsonsamm Programming 3 01-19-2011 11:34 AM
error while loading shared libraries: libstdc++.so.5: wrong ELF class: ELFCLASS64 permalac Linux - Software 5 05-06-2009 04:58 AM
Gmail notifier gives error: "wrong ELF class: ELFCLASS32" aero_b Linux - Newbie 13 03-01-2007 07:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration