Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

libstdc??

0 views
Skip to first unread message

Kevin Ehrler

unread,
Nov 4, 2001, 3:55:12 PM11/4/01
to
I downloaded a program that says has been compiled without error on
RedHat 6.0, I have RedHat 7.2 installed currently, I have source code, and
the runnable program. I try to start the program and I get an error:

./start: error while loading shared libraries: libstdc++-libc6.1-1.so.2:
cannot
load shared object file: No such file or directory

Can someone decipher this for me and tell me what I need to do?

Also can someone tell me how to compile the source code myself? I'm not
new to C++ development, but I am semi new to linux.


Again, as always I thank you in advance for your time.


Kevin


Steven Kaney

unread,
Nov 8, 2001, 4:05:09 AM11/8/01
to
.so files are like .a library files except that they can be shared by multiple
programs. The message
is a runtime error which says that it cant find the specified library.

If you actually compiled this program on your system this would be kind of odd
because it needed to find the file in order to not get a link time error
causing a 'undefined reference to ' message. You might check your LDPATH
environment variable to see if it is wacked out somehow or if the file is
located somewhere other than (/lib) where it
should be. (Normally you dont need to set LDPATH). Try to use find to see if
it is somewhere else.

If this program was built on another system then this isnt so odd, it just
means that you havent got the required
library files on your system. Do 'rpm -qa | fgrep stdc' and see if the package
'libstdc++-libc...' is installed. If
so then do 'rpm -ql libstdc++' and see what files should be there and check
that they are still there (and that they
are protected so that you can access them). If you dont have the package then
go get it on your distro or on the net.

OBTW: I assumed you were using a Redhat compatible distro that uses rpm. If
you dont have rpm then you'll have to check your info to see how packages are
installed and/or queried.

Kevin Ehrler

unread,
Nov 8, 2001, 4:17:45 PM11/8/01
to
Ok... It looks like I actually have a newer version of the files than
the one this program is expecting installed. Can someone tell me if
recompiling the program will fix this error...and if so, how do I go about
doing it? I'm not new to development but I am relativly new to development
on linux.

Thanks again in advance, Kevin\


"Steven Kaney" <bic...@eskimo.com> wrote in message
news:3BEA4AC5...@eskimo.com...

Daniel Rall

unread,
Nov 9, 2001, 3:33:09 PM11/9/01
to
"Kevin Ehrler" <rist...@hotmail.com> writes:

> Ok... It looks like I actually have a newer version of the files than
> the one this program is expecting installed. Can someone tell me if
> recompiling the program will fix this error...and if so, how do I go about
> doing it? I'm not new to development but I am relativly new to development
> on linux.

You can sometimes get away with throwing a symlink into /usr/lib from
the expected name to the version you have. For example, if your
program is linked against version 0 of the foo library:

cd /usr/lib
ln -s libfoo.so.0.96 libfoo.so.0

WARNING: Do *not* do this with production code -- this is a hack which
will sometimes allow you to proceed w/ a compile, but should never be
relied upon in the long term.

John Aldrich

unread,
Nov 28, 2001, 1:35:48 PM11/28/01
to
"Kevin Ehrler" <rist...@hotmail.com> wrote in message news:<ZDCG7.35$T6.1...@typhoon.mn.mediaone.net>...

> Ok... It looks like I actually have a newer version of the files than
> the one this program is expecting installed. Can someone tell me if
> recompiling the program will fix this error...and if so, how do I go about
> doing it? I'm not new to development but I am relativly new to development
> on linux.
>
> Thanks again in advance, Kevin\
>
The answer depends on how it's packaged. If it's a tarball, you should
probably just un-tar it (tar xzvf <filename.tar.gz> should work. If
it's bzipped, you might have to bunzip it first. Then go to the
directory where it untarred & unzipped and read the "README" file. If
there isn't one, you can try "./configure" then "make" and then "make
install" from the unzipped directory.

If it's an RPM and there's a .src.rpm version available, su to root
(or just open another login window and log in as root) and type "rpm
--rebuild <filename.src.rpm>" You can add in some other options but
for now, this will work. ASSUMING that it compiles correctly, look in
/usr/src/redhat/RPMS/i386/ and you should find your brand new RPM.
From there just do an "rpm -Uvh <filename.rpm>" and you should be good
to go. If it complains that the program is already installed, go ahead
and uninstall (rpm -e filename [NOTE --- DO NOT USE "filename.rpm"! IT
JUST WANTS THE *PROGRAM NAME*]) then reinstall with the new RPM you
built.

0 new messages