LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Error when attempting to start Firefox (https://www.linuxquestions.org/questions/mandriva-30/error-when-attempting-to-start-firefox-412056/)

Tim60 02-05-2006 09:24 PM

Error when attempting to start Firefox
 
Hi, I downloaded and am attempting to run Firefox 1.5, (currently running v. 1.02), but I get the following error:

[tim@localhost firefox]$ ./firefox
./firefox-bin: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

I figured that meant I was missing the lib file, so I downloaded and attempted to install it, but it said it was already installed.

I've been googling for hours with no solutions yet. Any help would be greatly appreciated.

* I'm running Mandriva 2005 LE

Matir 02-05-2006 09:39 PM

Please post the output of 'ldd `which firefox-bin`'.

Half_Elf 02-05-2006 09:44 PM

This is just a broken link... it may happen when you update or install a new library.
First locate the libstdc librairy :
locate libstdc (or find or whatever you like more than locate)
Once you found this, you have to recreate the broken link. On my system, locate find me some directory, and especially this one (should be almost the same for you :
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/libstdc++.la
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/libstdc++.so
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/libstdc++.a
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/libstdc++.so.6
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/libstdc++_pic.a
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/libstdc++.so.6.0.3


As you can see, I am missing libstdc++.so.5. No problem, I will recreate it. The "libstdc++.so" file is the "main" and other are just link to that one (on my system at least). So just creating a link named "libstdc++.so.5" that point to "libstdc++.so" should be fine as long as you believe in the backward compatibility god. Try :

ln -s /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/libstdc++.so /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/libstdc++.so.5 (of course change the path for your if it's not the same!!).

Now, your firefox should be able to find what it misses :)

I hope this help.

augurseer 02-05-2006 09:59 PM

half-elfs solution should work 100%..........

Tim60 02-05-2006 11:26 PM

Sorry to be a nuisance, but I'm still not having any luck. First, here's the output Matir requested:

[root@localhost ~]# ldd `which firefox-bin`
which: no firefox-bin in (/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin)
ldd: missing file arguments

and here's my results from Half_Elfs instructions:

locate libstdc
/usr/lib/libstdc++.so.6.0.3
/usr/lib/libstdc++.so.6
/usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/libstdc++.so
/usr/lib/libstdc++.so.5

root@localhost ~]# ln -s /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/libstdc++.so /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/libstdc++.so.5
ln: `/usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/libstdc++.so.5': File exists


[root@localhost firefox]# ./firefox
./firefox-bin: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory


next, I tried:

root@localhost ~]# ln -s usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/libstdc++.so /usr/lib/libstdc++.so.5
ln: `/usr/lib/libstdc++.so.5': File exists


I'm sure Im doing something stupid, but I'm still a rookie at these command lines.

Half_Elf 02-06-2006 07:58 AM

Okay, the link exist but it is possible that it points on nothing. To check, try
ls -l /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/libstdc++.so.5
or
ls -l /usr/lib/libstdc++.so.5

This should tell you where /usr/lib/libstdc++.so.5 points to. Then, verify the "destination" on the link with the same "ls -l" command. (I'm not on a Linux computer so I can't give you examples sorry).

If you find out that the link is wrong and point on nothing, adding the "-f" flag to the command I gave you last time will overwrite the old link and recreate one. But make sure the link is really wrong before doing so. If you do think so, the command is :
ln -sf /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/libstdc++.so /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/libstdc++.so.5

Tim60 02-07-2006 12:27 AM

Here's the results:
-------------------
[root@localhost tim]# ls -l /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/libstdc++.so.5
lrwxrwxrwx 1 root root 55 Feb 5 21:37 /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/libstdc++.so.5 -> /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/libstdc++.so*

This looked ok, then I tried the alternate command and got a different output that I haven't seen yet through this process::
----------------
[[root@localhost tim]# ls -l /usr/lib/libstdc++.so.5
lrwxrwxrwx 1 root root 29 Feb 5 01:07 /usr/lib/libstdc++.so.5 -> /usr/local/lib/libstdc++.so.5

My /usr/local/lib/ directory is empty. Also, the paths I italicized in the above output were flashing red.

I ran ls -l and got this:
-------------------------
lrwxrwxrwx 1 root root 55 Feb 5 21:15 libstdc++.so -> /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/libstdc++.so*
lrwxrwxrwx 1 root root 57 Feb 5 21:16 libstdc++.so.5 -> /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/libstdc++.so.5*

Then I ran the next command just to confirm that there was nothing there:
--------------------------------------------------------------------------
[root@localhost ~]# ls -l /usr/local/lib/libstdc++.so.5
ls: /usr/local/lib/libstdc++.so.5: No such file or directory

I went back to the man pages and help sites thinking I might try to create a link in that folder, but I'm not certain if that's the right move and experimenting usually gets me in trouble. Didn't want to screw things up worse than they already are.

reddazz 02-07-2006 12:54 AM

I suggest that you first check that you have libstdc++5 installed by doing
Code:

#rpm -qa | grep -i libstdc++5
if not, then do
Code:

#urpmi libstdc++5

Tim60 02-07-2006 02:34 AM

Yes, it's installed.

[root@localhost tim]# rpm -qa | grep -i libstdc++5
libstdc++5-devel-3.3.2-6mdk
libstdc++5-3.3.2-6mdk

[root@localhost tim]# urpmi libstdc++5
Everything already installed


All times are GMT -5. The time now is 08:34 AM.