Compiled C++ application errors out with: error while loading shared libraries: libstdc++-libc6.2-2.so.3
October 18th, 2007 by Oliver - Tagged with C++ - Posted in Other Stuff, Web Platforms
I recently came across a problem while trying to get a pre-compiled C++ executable to run on a new CentOS Enterprise 5 server. The executable kept quitting due with the following message:
/home/usr/testusr/TestApp.e: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory
I scowered the internet looking for the correct packages to install via YUM or the usual RPM sources. YUM refused to install the packages that were required as did RPM. The RPM installation of: compat-libstdc++-devel-7.3-2.96.128.i386 failed saying that it required its self to install ?!!
So I logged on to one of our old Fedora CORE 1 (Yes, shes old but still functions perfectly for what we need until we upgrade later on) and stole the file: libstdc++-libc6.2-2.so.3 from the /usr/lib directory and placed it in the corresponding location on the new CentOS server. And what do you know it worked. Handily CentOS as far as I understand is a ‘member’ of the Redhat tree so this will only probably work in certain circumstances.
I have provided the file for download, should help anyone else out in the same situation running an x86 setup.Â







