LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   Error while loading shared libraries: libstdc++.so.5 (http://www.linuxquestions.org/questions/fedora-35/error-while-loading-shared-libraries-libstdc-so-5-a-849259/)

ritika_sharma 12-09-2010 06:09 AM

Error while loading shared libraries: libstdc++.so.5
 
I am getting this error while installing NS-2.1b9a in fedora 8.0.
./tcl2c++: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
make: *** [embedded-tcl.cc] Error 127
tclcl-1.0b12 make failed! Exiting ...

I tried to install libstdc++.so.5 by following command:
$yum install compat-libstdc++.so.5

But it says:
Setting up Install Process
Parsing package install arguments
No package compat-libstdc++.so.5 available.
Nothing to do

libstdc++.so.5 is already there in /usr/lib/.
I tried giving link to newly installed libstdc++.so.5's link as well.
What should I do now?
NB: I have gcc-3.3 installed in my system.

tizzef 12-09-2010 07:39 AM

Hi there,

Please have a look to this post here

Cheers.

knudfl 12-09-2010 09:28 AM

In your other thread here
http://www.linuxquestions.org/questi...lled-g-848952/
... you tell, that you have /opt/gcc33/.
Then you already have libstdc++-so.5 , and can make a link :
cd /usr/lib/
&& sudo ln -s /<path-to-folder-with-libstdc++-so.5>/libstdc++-so.5


Or alternatively add Hardy to /etc/apt/sources.list :
Code:

deb http://76.73.4.58/ubuntu/ hardy-updates main
deb http://76.73.4.58/ubuntu/ hardy universe
deb http://security.ubuntu.com/ubuntu hardy-security main
deb http://security.ubuntu.com/ubuntu hardy-security universe

.. and do : sudo apt-get install libstdc++5

( And you can of course also do : sudo apt-get install g++-3.3 ).
..

EDIT : I can see, you are now using Fedora 8 :
# yum provides */libstdc++-so.5
And or # yum search libstdc++
# yum install compat-libstdc++-33

.. when you have changed your /etc/yum.repos.d/fedora.repo to :
( If your repo isn't already changed.)
Code:

[fedora]
name=Fedora
baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/8/Everything/i386/os/
enabled=1

[updates-newkey-i386]
name=Fedora-update-newkey-i386
baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/updates/8/i386.newkey/
enabled=1


knudfl 12-09-2010 11:58 AM

http://mohittahiliani.blogspot.com/2...-8-ubuntu.html
Using the modified ns-allinone-2.1b9a-gcc32.tar.gz
cd ns-allinone-2.1b9a/ && patch -p1 < ns21b9a.patch
&& sh install :
No errors on Fedora 8. ( OK too in CentOS5, Fedora 13, 14, PCLinuxOS2010.)
Required is gcc-3.3.6. The usually recommended gcc-3.3.6 for Fedora :
gcc3.3-3.3.6-1pclos2007 + gcc3.3-c++-3.3.6-1pclos2007 , etc.

gcc3.3-cpp-3.3.6 http://ftp.uwsg.indiana.edu/linux/pc...s2007.i586.rpm
gcc3.3-3.3.6 http://ftp.uwsg.indiana.edu/linux/pc...s2007.i586.rpm
gcc3.3-c++-3.3.6 http://ftp.uwsg.indiana.edu/linux/pc...s2007.i586.rpm
libstdc++5-3.3.6 http://ftp.uwsg.indiana.edu/linux/pc...s2007.i586.rpm
libstdc++5-devel-3.3.6 http://ftp.uwsg.indiana.edu/linux/pc...s2007.i586.rpm

cd <folder-with-gcc-3.3-pclos2007>/
# rpm -Uvh --force *
( --force will replace /usr/bin/c++ : Suggest : make a backup. ( c++4.1.2.))
( On later Fedoras with no /usr/bin/c++ : # 'rpm -Uvh *' will do.)

export CC=gcc-3.3.6 CXX=g++-3.3.6 && ./install
.. Or edit the Makefile.in for otcl , tclcl , ns-2.1b9a , nam :
CC = gcc-3.3.6
CPP = g++-3.3.6
..

John VV 12-09-2010 07:10 PM

Quote:

I am getting this error while installing NS-2.1b9a in fedora 8.0.
fedora 8 is a very very old and unsupported dead version .
PLEASE install the current and SUPPORTED version -- Fedora 14"

this post for using the dead versions of fedora might help
BUT i would use a SUPPORTED version
"Repository configuration for older Fedora releases. "
http://forums.fedoraforum.org/showthread.php?t=221471

but DO NOT expect any new software to run on 8
firefox 3.6 will not work !!!

ritika_sharma 12-10-2010 05:29 AM

Quote:

Originally Posted by knudfl (Post 4186151)
http://mohittahiliani.blogspot.com/2...-8-ubuntu.html
Using the modified ns-allinone-2.1b9a-gcc32.tar.gz
cd ns-allinone-2.1b9a/ && patch -p1 < ns21b9a.patch
&& sh install :
No errors on Fedora 8. (Or any other Fedora, probably. OK on pclos2010.)
Required is gcc-3.3.6. The usually recommended gcc-3.3.6 for Fedora :
gcc3.3-3.3.6-1pclos2007 + gcc3.3-c++-3.3.6-1pclos2007 , etc.
..

Hi Kundfl,
I did exactly, as mentioned. I installed gcc-3.3 (including g++, c++ etc.) and export CC and CXX. I downloaded patch and applied. Now I get the following error.

/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/vector.tcc:452: error: expected unqualified-id before ( token
make: *** [diffusion3/ns/difftimer.o] Error 1
Ns make failed!

Any idea, what could be the problem?

knudfl 12-10-2010 08:19 AM

Quote:

I installed gcc-3.3
Hopefully you mean version 3.3.6 . ( Version 3.3.3 will not work.)

Quote:

/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2.../
By mistake g++ version 4.1.2 is used for this, please edit the four Makefile.in
to avoid g++ 4.1.2 being used.
And after that, also edit the four Makefile .
I.e. in otcl-1.0a8/, tclcl-1.0b12/, ns-2.1b9a/, nam-1.0a11a/ .
( There may not yet be a Makefile in nam, Makefile.in will do the trick.)

The export command is temporary, will reset, if you close the terminal.
( export CC=gcc-3.3.6 CXX=g++-3.3.6 && sh install )
The export command usually works for all new ns2, like ns-allinone-2.34,
but for ns-allinone-2.1b9a-gcc32 : I don't know.
The editing of the Makefile** is the proof method.



No issues either with Fedora 13, 14 or Ubuntu 9.04.
( Your first thread, ns-allinone-2.1b9a, says 'Ubuntu 9.04'.)
..


All times are GMT -5. The time now is 11:16 PM.