LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-21-2004, 04:25 AM   #1
HTS
LQ Newbie
 
Registered: Apr 2004
Location: Middle East
Distribution: RH9
Posts: 23

Rep: Reputation: 15
Question error while loading.... libstdc++.so.5


Hello,

I am trying to run c++ program (which was compiled in RED-HAT 9.0 under gcc version 3.2.2)
on RED-HAT 7.0 with no gcc compiler (2.4.18 gcc version 2.95.3 20010315 (release)).

THE PROBLEM: After I move the program from RH 9 to RH 7 I got this error message:

stam: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory.

I tried to compile with -L/usr/lib/gcc-lib/i386-redhat-linux7/2.96/ and the error now:

stam: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory.

What should I do to make it possible to run C++ programs.

thank you, HTS
 
Old 07-27-2004, 08:09 AM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
By either installing the proper runtime libraries, or compiling against the older runtime libraries. If you can't compile the program in RH7 environment, you can build a chroot jail to your RH9 env having RH7 libraries.
 
Old 07-28-2004, 12:48 AM   #3
HTS
LQ Newbie
 
Registered: Apr 2004
Location: Middle East
Distribution: RH9
Posts: 23

Original Poster
Rep: Reputation: 15
Hi,
cam you tell me more about how to
"build a chroot jail to your RH9 env having RH7 libraries"
Do I need to download RH-7 libraries and compile them.
(I don't want to lose the new libraries....)
thanx.
 
Old 07-28-2004, 02:40 AM   #4
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Well, while coming from debian world and thinking it is trivial, doing the same thing in RH seems to be somewhat more work. In fact, there is even a readymade program in debian that generates chroot environments for different purposes for building against different debian systems.

Results of some googling:
- http://gnumonks.org/ftp/pub/doc/chroot-howto.html -- for a very old version of RH, doing almost the right thing (well, for wrong reasons and doesn't point out that the chroot environment could be of a differerent version).

- http://leapster.org/linux/redhat/rhel/ -- Builds a chroot environment for other RH installation. Unfortunately not for RH7.3, but for RHEL and it builds it from source, which is not necessary in this case and the document seems to be uncompleted.
 
  


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: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 05:47 AM
Error: libstdc++-libc6.2-2 .so.3 ceenu99 Linux - Software 2 07-14-2005 11:53 PM
mismatched rpm versions of libstdc++ and libstdc++-devel pcweirdo Linux - Software 8 11-29-2004 09:30 AM
error while loading shared libraries: libstdc++-libc6.1-1.so.2 pikiemeow Linux - Software 2 10-27-2004 08:49 PM
Error regarding libstdc++-libc6.1-2.so.3 kirti Linux - Software 7 06-11-2004 01:45 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:21 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
Open Source Consulting | Domain Registration