LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-01-2016, 05:34 PM   #1
lilzz
Member
 
Registered: Aug 2006
Posts: 73

Rep: Reputation: 15
libstdc++.so.5: cannot open shared object file:


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


I know where that libstdc++.so.5 is so I export LD_LIBRARY_PATh=/path to libstdc++.so.5,

but I still getting the same error.

Why? I know getting the LD_LIBRARY_PATH right to include that library should do it.
 
Old 04-01-2016, 05:52 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,589

Rep: Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643
libstdc++.so.5 ????

that is old ,very old .


it is part of the compatibility gcc3.3 ( or 3.4 ) tools

and would be installed to the system default /usr/lib , or /usr/lib64

and THAT is in the system $PATH and $LD_LIBRARY_PATH by default



What operating system and What program is trying to use a very old version of libstc
 
Old 04-02-2016, 07:40 PM   #3
lilzz
Member
 
Registered: Aug 2006
Posts: 73

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by John VV View Post
libstdc++.so.5 ????

that is old ,very old .


it is part of the compatibility gcc3.3 ( or 3.4 ) tools

and would be installed to the system default /usr/lib , or /usr/lib64

and THAT is in the system $PATH and $LD_LIBRARY_PATH by default



What operating system and What program is trying to use a very old version of libstc
I am using Ubuntu 14.04 LTS. The OS should able to locate that libstdc++.so.5 right? I am running an open source development program, not a well known one. Why can't the OS locate it?
 
Old 04-02-2016, 08:05 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,589

Rep: Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643
double check that there is inded a file
/usr/lib64/libstdc++.so.5

but if you need that old of a version
you should be using older gcc3.3 or 3.4 to build the program
and NOT the default version 4

you can have many different versions off gcc installed
right now i have
gcc-3.3
gcc 4.1
gcc 4.8

i am not using gcc5 right now

Last edited by John VV; 04-02-2016 at 08:10 PM.
 
Old 04-03-2016, 06:10 PM   #5
lilzz
Member
 
Registered: Aug 2006
Posts: 73

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by John VV View Post
double check that there is inded a file
/usr/lib64/libstdc++.so.5

but if you need that old of a version
you should be using older gcc3.3 or 3.4 to build the program
and NOT the default version 4

you can have many different versions off gcc installed
right now i have
gcc-3.3
gcc 4.1
gcc 4.8

i am not using gcc5 right now
libcstdc++ in not in my /usr/lib64 or /usr/x32 folder. That's why I manually pointed by export LD_LIBRARAY_PATH.
its prebuilt binary, I do not have the source. Can't change GCC.
 
Old 04-03-2016, 08:57 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,589

Rep: Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643
well if you do not have that library installed
then HOW can you point gcc to it ?

it is part of the gcc3.3 compatibility deb

install the old compatibility gcc 3.3
and use that to build the old code that needs the old stdc 5

Quote:
Can't change GCC.
why not ?

Code:
export CC=gcc3.3
or set alternatives
or
explicitly call 3.3
Code:
g++-3.3 -o program program.cpp
 
Old 04-03-2016, 10:10 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,483

Rep: Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633
Quote:
Can't change GCC
These are the default gcc`s included with Ubuntu 14.04 :
gcc-4.4/g++-4.4, gcc-4.6/g++-4.6, gcc-4.7/g++-4.7, gcc-4.8/g++-4.8 ,,,
where "4.8" is the system compiler.

Switching compiler : $ export CC=gcc-4.4 CXX=g++4.4 && <other command>


But : You don't need any gcc packages to get libstdc++.so.5 :
http://packages.ubuntu.com/trusty/libstdc++5
.... Just install the package (may not be present in "the funny Package Manager") :
$ sudo apt-get install libstdc++5

Or install synaptic : $ sudo apt-get install synaptic
... to get a 'Package Manager' that has all available packages visible.


-
 
  


Reply

Tags
libstdc++.so.5


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.6: cannot open shared object file: mahiba Linux - Hardware 2 05-10-2013 05:18 PM
while loading shared libraries: libstdc++.so.6: cannot open shared object file: vswapnasr@gmail.com Linux - Software 2 05-05-2013 04:44 AM
error while loading shared libraries: libstdc++.so.6: cannot open shared object file: vswapnasr@gmail.com Linux - Software 1 05-04-2013 06:49 AM
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

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

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