I got the error
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found
I have installed the following rpm file: https://centos.pkgs.org/6/nux-dextop-i386/chrome-deps-stable-3.11-1.i386.rpm
because there are GLIBCXX_3.4.14
and GLIBCXX_3.4.15
versions for centOS6.
[cloudera@quickstart Downloads]$ strings
/opt/google/chrome/lib/libstdc++.so.6 | grep GLIBC
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_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBC_2.3
GLIBC_2.0
GLIBC_2.4
GLIBC_2.1
GLIBC_2.1.3
GLIBC_2.3.2
GLIBC_2.2
GLIBCXX_DEBUG_MESSAGE_LENGTH
I have linked this folder to libstdc++.so
[cloudera@quickstart DataGenLinux]$ ln -s /opt/google/chrome/lib/libstdc++.so.6 libstdc++.so.6
[cloudera@quickstart DataGenLinux]$ ./myFile.out -h
./DataGen.out: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not
found (required by ./DataGen.out)
./DataGen.out: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not**
found (required by ./DataGen.out)
I have defined and exported LD_LIBRARY_PATH.
[cloudera@quickstart DataGenLinux]$ echo $LD_LIBRARY_PATH
/opt/google/chrome/lib/libstdc++.so.6
SOLVED
mv /usr/lib64/libsrdc++.so.6 /usr/lib64/libsrdc++.so.6_bkp
mv /opt/google/chrome/lib/libstdc++.so.6 /usr/lib64/libsrdc++.so.6
This solved my issue
LD_LIBRARY_PATH
should point to a path, not a library.
This should work for you:
LD_LIBRARY_PATH=/opt/google/chrome/lib:$LD_LIBRARY_PATH ./myFile.out -h
Alternatively,
export LD_LIBRARY_PATH=/opt/google/chrome/lib:$LD_LIBRARY_PATH
./myFile.out -h
Note this does not involve any symlinking nor replacing system libraries.
Since libstdc++ (and glibc as well) are forward compatible, it is best to compile/link against the oldest version you want to support (if of course you are in control of myFile.out
).
It is definitely better to look for a proper CentOS6 package of that version of libstdc++ you need. But even then you'll need to point your loader to it, as it will not replace the system /usr/lib64/libstdc++.so.6
, rather live alongside it.
You don't provide much context so I'm not sure what exactly you're trying to accomplish with what exactly.