LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-26-2004, 02:32 PM   #1
sleepylight
Member
 
Registered: Apr 2004
Location: Joppa
Posts: 32

Rep: Reputation: 16
shared object library won't load (libstdc++)


Hey,

This should be a pretty easy answer since I'm sure I'm not the first to have this problem. I have some binaries I've brought over from a redhat 8 (gcc 3.2) machine to a new computer running Fedora 1 for x86-64.

When I run the program I get the following error message:
[mpbottig@indra linux]$ ./startup_mgr
./startup_mgr: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

Ok, that's understandable. The manager can't find that lib because it's not in the same place it was when this program was compiled. On this machine libstdc++.so.5 is in /usr/lib/lib64, not /usr/lib. So, how do I tell the executable to look somewhere else? I read through a bunch of posts that say to run some form of ldconfig, but according to ldconfig the library is right where it's supposed to be. What do I do next?

Actually, as totally irritating as this problem is, I think maybe getting a good explanation of ld-linux, and ELF binaries would help a great deal as well.
 
Old 04-26-2004, 08:21 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"So, how do I tell the executable to look somewhere else?"

You set up symbolic links from where the program is looking to where the library routine is really located. For example:
ln -s /usr/lib/lib64/libstdc++.so.5 /usr/lib/libstdc++.so.5

At which point you may run into a problem with a program compiled to run on a 32 bit machine running library routines compiled to run on a 64 bit machine. Maybe not. You can try it and see if it works.

The ultimate solution is to compile the programs on the new machine.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeB....home.page.html

Steve Stites
 
Old 04-26-2004, 08:52 PM   #3
sleepylight
Member
 
Registered: Apr 2004
Location: Joppa
Posts: 32

Original Poster
Rep: Reputation: 16
Actually, I tried that before I sent out this post. Someone on experts exchange hypothesized, like you, that I'm going to have trouble getting a 32 bit program to play nicely with the 64bit libs. I was kinda hoping that since the architecture was built around the idea that you could run legacy 32bit apps along side 64bit apps I wouldn't need more libs. Maybe I'm not that lucky. Anyway, I'll post my findings when I get this working.
 
Old 04-26-2004, 09:25 PM   #4
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
32 bit aaplications are not considered legacy my friend.
 
Old 04-27-2004, 04:24 PM   #5
sleepylight
Member
 
Registered: Apr 2004
Location: Joppa
Posts: 32

Original Poster
Rep: Reputation: 16
Well, the solution for me was to install a number of 32 bit versions of my libarary packages. Virutally all my problems disappeared after I got the 32bit libs on the system. I had to break down and just plain copy a couple of the libraries off of P4, but almost everything went on w/o conflicting with previously installed packages.

After they were installed running /sbin/ldconfig -n /usr/[libdir] set everything up.

32 bit apps are not in my opinion "legacy" per say, but the ones I'm working with are off of RH 6.2 systems and use Motif instead of gtk or qt. As lame as these apps are, I'd consider them legacy
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 05:47 AM
unable to step through function in shared object library using gdb markhod Programming 2 01-03-2009 02:00 AM
DVDRip (Transcode) cannot load shared object? phoix Linux - Software 3 01-12-2005 06:14 PM
my slack can't load shared library AnhTuan Slackware 6 10-03-2004 09:27 AM
error while loading shared libraries: libdb-4.1.so: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 07:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:28 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