3

I try to use a program and I get the following error.

/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found

Under /usr/lib64 the libstdc++ I see is libstdc++.so.6.0.13 (and a soft link).

With strings libstdc++.so.6.0.13 | grep GLIBCXX I get

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH

With cat /etc/redhat-release I get

Red Hat Enterprise Linux Workstation release 6.4 (Santiago)

So the question in what should I do in order to fix that. Should I install some new packages and if yes which ones?

George Kastrinis
  • 115
  • 1
  • 1
  • 11

2 Answers2

0

You need to install a newer version of GCC and, if it is a separate package in CentOS, a newer version of gcc-libs. Unfortunately, I don't think such recent versions will be available in the CentOS repository.

One option would be to install the latest version of GCC for your user account only (i.e. don't install it system-wide, which will help avoid some potential headaches). You can do this pretty easily using GSRC, but of course you can also just download the GCC source archive and specify a non-standard directory to the --prefix option. Then, when you build your new software, you'll have to specify LDFLAGS="-L /path/to/your/gcc/libs -L/usr/lib (etc)", CFLAGS="-I /path/to/your/gcc/includes -I /usr/include (etc)" and probably something like CXX=/path/to/your/g++. When you run the program you'll need LD_LIBRARY_PATH=/path/to/your/gcc/libs in your environment.

Alternatively, you can install a distro with more up-to-date software, though I understand that this is not always possible.

0

I had the same problem so I used this link for glibcxx_3.4.15 and manually placed the contents to the folder required (/usr/lib folder). I was able to run gdb on my apps after that. Hope this helps.

EDIT: Select the link under the ALT Linux tabs and download binary package (these packages are more generic and can be used on various distros).

Ex: libstdc++6-4.7.2-alt7.i586.rpm - GNU Standard C++ library

This will include libstdc++.so.6.0.17 as well as libstdc++.so.6.0.15.