Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GF23: Error while loading shared libraries: libstdc++.so.5
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Frequently Asked Questions
View previous topic :: View next topic  
Author Message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Tue Feb 28, 2006 2:01 pm    Post subject: GF23: Error while loading shared libraries: libstdc++.so.5 Reply with quote

Navigation: [Gentoo Fundamentals] [Table of Contents]

Q: Why am I getting the following error when trying to emerge anything?
Code:
/usr/bin/python: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

A: You have probably upgraded to gcc 3.4 without following the gcc upgrading guide. You will need to recompile everything that was previously linked to libstdc++.so.5, as described in the guide. However, since python is one of the programs that links to libstdc++.so.5, Portage won't work, so you'll have to work around that first.

You can temporarily fix python in one of two ways:
  • If you can find a binary package for your architecture of either gcc 3.3 or libstdc++-v3, you can untar them in the / directory. This will provide a working libstdc++.so.5, which should mean python and therefore portage works again. You should then emerge the binary package with a command like emerge -K '=sys-devel/gcc-3.3*' or emerge -K 'sys-libs/libstdc++-v3' so portage knows which files have been installed. You might be able to find suitable binaries here: http://dev.gentoo.org/~avenj/bins/.

  • You might also be able to get it to work by temporarily linking libstdc++.so.5 to libstdc++.so.6. You can find the location of the missing library by running find /usr -iname 'libstdc++.so.?'. You can then change to this directory and create libstdc++.so.5 as a symbolic link to libstdc++.so.6 by running ln -s libstdc++.so.6 libstdc++.so.5. This link should be removed after you re-emerge python.

You should then re-emerge python so it links against libstdc++.so.6. Now that python works again, you can run revdep-rebuild as described in the upgrading guide to fix the rest of your system.


If need any more help with this, please post to this thread: after gcc-3.4.3 emerge, emerge itself won't work anymore.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Frequently Asked Questions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum