LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-05-2009, 06:15 AM   #1
permalac
Member
 
Registered: Jul 2007
Location: Barcelona
Posts: 115

Rep: Reputation: 16
[SOLVED] while loading shared libraries: libstdc++.so.5: wrong ELF class: ELFCLASS64


We just reinstalled a server from ubuntu 7.10 to 8.04 and there is some execs wich don't work.

Symmetrize
Quote:
varoitus# /home/rafael.banchs/ACL09/EUPARL/tools/symmetrize -d
/home/rafael.banchs/ACL09/EUPARL/tools/symmetrize: error while loading shared libraries: libstdc++.so.5: wrong ELF class: ELFCLASS64
The ldd don't found the libraries:
Quote:
varoitus# ldd -d /home/rafael.banchs/ACL09/EUPARL/tools/symmetrize
undefined symbol: _ZSt4cout, version GLIBCPP_3.2 (/home/rafael.banchs/ACL09/EUPARL/tools/symmetrize)
undefined symbol: _ZSt4cerr, version GLIBCPP_3.2 (/home/rafael.banchs/ACL09/EUPARL/tools/symmetrize)
undefined symbol: _ZNSs20_S_empty_rep_storageE, version GLIBCPP_3.2 (/home/rafael.banchs/ACL09/EUPARL/tools/symmetrize)
linux-gate.so.1 => (0xffffe000)
librt.so.1 => /lib32/librt.so.1 (0xf7fc1000)
libstdc++.so.5 => not found
libm.so.6 => /lib32/libm.so.6 (0xf7f9b000)
libgcc_s.so.1 => not found
libpthread.so.0 => /lib32/libpthread.so.0 (0xf7f83000)
libc.so.6 => /lib32/libc.so.6 (0xf7e34000)
/lib/ld-linux.so.2 (0xf7fd2000)

But there are in the box:
Quote:
varoitus# locate ibstdc++.so.5
/opt/quest/lib64/support/libstdc++.so.5
/opt/quest/lib64/support/libstdc++.so.5.0.3
/usr/lib/libstdc++.so.5
/usr/lib/libstdc++.so.5.0.7
/usr/lib32/libstdc++.so.5

Many thanks

Last edited by permalac; 05-06-2009 at 04:59 AM. Reason: solved
 
Old 05-05-2009, 07:44 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

If you can recompile symmetrize and include /usr/lib32 in the libraries path, then do that.
Otherwise add /usr/lib32 to /etc/ld.so.conf, then run 'ldconfig' as root.

Dave
 
Old 05-05-2009, 09:57 AM   #3
permalac
Member
 
Registered: Jul 2007
Location: Barcelona
Posts: 115

Original Poster
Rep: Reputation: 16
Thanks, but it's my first time with ldconfig and I don't get it. :/

Code:
varoitus# whoami 
root
Code:
varoitus# /home/rafael.banchs/ACL09/EUPARL/tools/symmetrize
/home/rafael.banchs/ACL09/EUPARL/tools/symmetrize: error while loading shared libraries: libstdc++.so.5: wrong ELF class: ELFCLASS64
varoitus# ldd /home/rafael.banchs/ACL09/EUPARL/tools/symmetrize
	linux-gate.so.1 =>  (0xffffe000)
	librt.so.1 => /lib32/librt.so.1 (0xf7fcb000)
	libstdc++.so.5 => not found
	libm.so.6 => /lib32/libm.so.6 (0xf7fa5000)
	libgcc_s.so.1 => not found
	libpthread.so.0 => /lib32/libpthread.so.0 (0xf7f8d000)
	libc.so.6 => /lib32/libc.so.6 (0xf7e3e000)
	/lib/ld-linux.so.2 (0xf7fdc000)
So, whats on ld.so.conf?
Code:
varoitus# cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
And what's inside this *.conf
Code:
varoitus# cat /etc/ld.so.conf.d/*
# libc default configuration
/usr/local/lib
#luser libraries
/usr/lib
/usr/lib32
# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
varoitus#
vervose? looks fine , almost fine to me.
Code:
varoitus# ldconfig -v|grep libstdc++                           
/sbin/ldconfig.real: Path `/usr/lib' given more than once
/sbin/ldconfig.real: Path `/usr/lib32' given more than once
	libstdc++.so.5 -> libstdc++.so.5.0.7
	libstdc++.so.6 -> libstdc++.so.6.0.9

but it's not working, I've trying with links between libraries but I can not manage to make it work. Could you give me another tip?

Many thanks.

Last edited by permalac; 05-05-2009 at 10:22 AM.
 
Old 05-05-2009, 10:59 AM   #4
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
That all looks OK.

Does 'echo $LD_LIBRARY_PATH' output anything when you're logged in as whatever user you normally use?

Dave
 
Old 05-05-2009, 11:11 AM   #5
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Also, can you check that the ia32-libs package is installed? It probably is, since the /usr/lib32 directory has libraries in it, but worth checking.

Dave
 
Old 05-06-2009, 04:58 AM   #6
permalac
Member
 
Registered: Jul 2007
Location: Barcelona
Posts: 115

Original Poster
Rep: Reputation: 16
Hey many thanks, it's working pretty well.

I've installed ia32-libs, that was missing and now it works.

On the other side, I haven't said that I had this trouble with another machine, and i've also installed ia32-libs but also needed to add a particular library to ld.so.conf.

And third, so far this has been a great thread to learn something very interesting about linux runtime libraries, many thanks to all of you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
error while loading shared libraries: libstdc++.so.5 iNvIsIbLe HaNd Fedora 8 08-05-2015 08:52 PM
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 05:47 AM
error while loading shared libraries: libstdc++.so.5: cannot open shared object file PaulyWally Debian 2 10-18-2008 05:59 PM
error while loading shared libraries: libstdc++.so.5 slackr007 Linux - Newbie 1 09-07-2006 06:08 AM
error while loading shared libraries: libstdc++-libc6.1-1.so.2 pikiemeow Linux - Software 2 10-27-2004 08:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:04 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration