version `CXXABI_1.3.8' not found (required by ...)
GCC 4.9 introduces a newer C++ ABI version than your system libstdc++ has, so you need to tell the loader to use this newer version of the library by adding that path to LD_LIBRARY_PATH
. Unfortunately, I cannot tell you straight off where the libstdc++ so for your GCC 4.9 installation is located, as this depends on how you configured GCC. So you need something in the style of:
export LD_LIBRARY_PATH=/home/user/lib/gcc-4.9.0/lib:/home/user/lib/boost_1_55_0/stage/lib:$LD_LIBRARY_PATH
Note the actual path may be different (there might be some subdirectory hidden under there, like `x86_64-unknown-linux-gnu/4.9.0´ or similar).
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version CXXABI_1.3.8' not found
Add the library's path to the LD_LIBRARY_PATH
environment variable
TL;DR
GCC requires you to tell it where your library is located manually when it can't find the right version, which can be done in a few ways. One is adding it to the LD_LIBRARY_PATH
.
export LD_LIBRARY_PATH="/usr/local/lib64/:$LD_LIBRARY_PATH"
For some, the library path will be /usr/local/lib64/
. Others have reported the library path /usr/lib/x86_64-linux-gnu/
working for them instead.
Why do we need to add the library to LD_LIBRARY_PATH
?
When you compile and install GCC it puts the libraries in one of these directories, but that's all it does. According to the FAQs for libstdc++
, the error that we got means that the dynamic linker found the wrong version of the libstdc++
shared library. Because the linker can't find the right version, we have to tell it where to find the libstdc++
library.
The simplest way to fix this is to use the LD_LIBRARY_PATH environment variable, which is a colon-separated list of directories in which the linker will search for shared libraries.
There are other ways as well to fix this issue. You can find this and the other solutions mentioned briefly when you install gcc
if you read the make output:
Libraries have been installed in:
/usr/local/lib/../lib32
If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages.
Grr, that was simple! Also, "if you ever happen to want to link against the installed libraries," seriously?
ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found
Adding /home/wasiahmad/software/anaconda3/lib/
to the LD_LIBRARY_PATH
solved the problem. Thanks to Knud Larsen for his comment and the reminder that /lib64/libstdc++.so.6
currently comes first in LD_LIBRARY_PATH
.
Error building gcc 4.8.3 from source: libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.55)
So, this problem occurs when a library that has been built with a newer compiler is linked with an older version of C++ library - or sometimes when a newer headerfile is used to compile something that then links to an older C++ library.
It is also possible come up with a similar problem when moving binary files from one system to another, if the shared libraries installed on the "new system" are older than the ones on which the code was built.
There are typically three plausible solutions:
1. Recompile the offending library with an older compiler.
2. Install a newever version of the C++ library.
3. Rebuild the C++ library from sources (with a new enough compiler).
/usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found when loading R packages
Note the 3.3 hiding inside of /home/hpc/pr74ze/ru37wof2/R/x86_64-pc-linux-gnu-library/3.3/stringi/libs/x 86_64/stringi.so
-- you probably built that under 3.2 so it sits below /home/hpc/pr74ze/ru37wof2/R/x86_64-pc-linux-gnu-library/3.2
.
You can overcome this by setting your own .libPaths()
, either directly or via environment variables -- you may want something like ~/R/library
. See help(Startup)
for details.
Related Topics
Is It True That There Is No Need to Learn C Because C++ Contains Everything
C/C++: Static Function in Header File, What Does It Mean
Performance Penalty for Working with Interfaces in C++
Differencebetween a .Cpp File and a .H File
What Use Are Const Pointers (As Opposed to Pointers to Const Objects)
Do Negative Numbers Return False in C/C++
How to Fix: /Usr/Lib/Libstdc++.So.6: Version 'Glibcxx_3.4.15' Not Found
C++ Can Compilers Inline a Function Pointer
Where in Memory Is Vtable Stored
Getting a Boost::Shared_Ptr for This
Load an Pem Encoded X.509 Certificate into Windows Cryptoapi
Detect Operator Support with Decltype/Sfinae
Converting a Row of Cv::Mat to Std::Vector
Get a Single Line Representation for Multiple Close by Lines Clustered Together in Opencv
How to Store Array in One Column in SQLite3
How to Add the Mingw Bin Directory to My System Path
Why Does Unique_Ptr Take Two Template Parameters When Shared_Ptr Only Takes One