LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GCC not found (http://www.linuxquestions.org/questions/linux-newbie-8/gcc-not-found-465650/)

QianChen 07-19-2006 04:02 PM

GCC not found
 
Hi.

My os is Linux 9. The gcc works well. I have a C program(exe)which can work well on another linux machine. when I run it. The error says:
error while loading shared libraries:libstdc++.so.6: cannot open shared object file: No such file or directory

I looked it up in Internet and did such things:

find|grep libstdc++.so.6
And I find the directory is /lib/ssa
So I export LD_LIBRARY_PATH=/lib/ssa

And when I run the C program. It says:
/lib/ssa/libgcc_s.so.1: version 'GCC_4.0.0' not found /lib/ssa/libstdc++.so.6:version 'GLIBCXX_3.4.4' not found /lib/ssa/libstdc++.so.6:version 'GLIBCXX_3.4.5' not found /lib/ssa/libstdc++.so.6:version 'GLIBCXX_3.4.6' not found /lib/ssa/libstdc++.so.6:version 'GLIBCXX_3.4' not found

I type commands:
ssa># strings libgcc_s.so.1 |grep GCC
GCC_3.0
GCC_3.3
GCC_3.4

And I went to internet to download libgcc1-4.0.1-5mdk.i586.rpm

when I type the command
>strings libgcc1-4.0.1-5mdk.i586.rpm |grep GCC
libgcc_s.so.1(GCC_3.0)
libgcc_s.so.1(GCC_3.3)
libgcc_s.so.1(GCC_3.3.1)
libgcc_s.so.1(GCC_3.4)
libgcc_s.so.1(GCC_3.4.2)
libgcc_s.so.1(GCC_4.0.0)

I also downloaded libstdc++6-4.0.1-5mdk.i586.rpm
>strings libstdc++6-4.0.1-5mdk.i586.rpm|grep GLIBCXX
libstdc++.so.6(GLIBCXX_3.4)
libstdc++.so.6(GLIBCXX_3.4.1)
libstdc++.so.6(GLIBCXX_3.4.2)
libstdc++.so.6(GLIBCXX_3.4.3)
libstdc++.so.6(GLIBCXX_3.4.4)
libstdc++.so.6(GLIBCXX_3.4.5)

But I didn't find GLIBCXX in /lib/ssa/libstdc++.so.6

So I think maybe my libgcc_s.so.1 is too old.

My question is : If I am right, how to update them?

Here is the list of my /lib/ssa
total 9740
-rw-r--r-- 1 root root 0 Jul 19 15:16 chen.txt
drwxr-xr-x 3 root root 4096 Aug 3 2004 gcc-lib
lrwxr-xr-x 1 root root 15 Nov 21 2005 libg2c.so -> libg2c.so.0.0.0
lrwxr-xr-x 1 root root 15 Nov 21 2005 libg2c.so.0 -> libg2c.so.0.0.0
-rwxr-xr-x 1 root root 109720 Aug 3 2004 libg2c.so.0.0.0
lrwxr-xr-x 1 root root 13 Nov 21 2005 libgcc_s.so -> libgcc_s.so.1
-rw-r--r-- 1 root root 151094 Aug 3 2004 libgcc_s.so.1
lrwxr-xr-x 1 root root 15 Nov 21 2005 libgcj.so -> libgcj.so.4.0.0
lrwxr-xr-x 1 root root 15 Nov 21 2005 libgcj.so.4 -> libgcj.so.4.0.0
-rwxr-xr-x 1 root root 8589332 Aug 3 2004 libgcj.so.4.0.0
-rw-r--r-- 1 root root 366 Aug 3 2004 libgcj.spec
lrwxr-xr-x 1 root root 19 Nov 21 2005 libmudflap.so -> libmudflap.so.0.0.0
lrwxr-xr-x 1 root root 19 Nov 21 2005 libmudflap.so.0 -> libmudflap.so.0.0.0
-rwxr-xr-x 1 root root 102472 Aug 3 2004 libmudflap.so.0.0.0
lrwxr-xr-x 1 root root 21 Nov 21 2005 libmudflapth.so -> libmudflapth.so.0.0.0
lrwxr-xr-x 1 root root 21 Nov 21 2005 libmudflapth.so.0 -> libmudflapth.so.0.0.0
-rwxr-xr-x 1 root root 109832 Aug 3 2004 libmudflapth.so.0.0.0
lrwxr-xr-x 1 root root 16 Nov 21 2005 libobjc.so -> libobjc.so.1.0.0
lrwxr-xr-x 1 root root 16 Nov 21 2005 libobjc.so.1 -> libobjc.so.1.0.0
-rwxr-xr-x 1 root root 81860 Aug 3 2004 libobjc.so.1.0.0
lrwxr-xr-x 1 root root 18 Nov 21 2005 libstdc++.so -> libstdc++.so.6.0.0
lrwxr-xr-x 1 root root 18 Nov 21 2005 libstdc++.so.6 -> libstdc++.so.6.0.0
-rwxr-xr-x 1 root root 762864 Aug 3 2004 libstdc++.so.6.0.0
drwxr-xr-x 2 root root 4096 Nov 21 2005 security

Any hints are highly appreciated.

Qian

acid_kewpie 07-19-2006 04:49 PM

there is no such thing as "Linux 9" Linux is only on version 2.6 at the moment.... normally people actually mean redhat 9 here, which makes me concerned that you're clearly using rpm's for mandrake (the mdk code in the files you have). assuming it is rh9 then that and gcc4 didn't overlap in lifetime at all, rh9 is pretty old now in the big scheme of things. you might be able to pick up rpm's for it at fedoralegacy.org though.


All times are GMT -5. The time now is 06:01 PM.