Installing libstdc++6 and gcc-9 helped me. Hope it will help you too.
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-9
sudo apt install libstdc++6
Answer from WesternGun on askubuntu.comHere's a solution for this problem in Ubuntu 16.04
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9
sudo apt-get upgrade libstdc++6
You can check if you get GLIBCXX desired version like this:
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
I solved problem like this (but GLIBCXX_3.4.21 on CentOS) but it is not dependent from os. The library is part of gcc compiler so need to install or compile appropriate version of gcc. This is table of versions of gcc and versions of appropriate libstdc++:
GCC 4.9.0: libstdc++.so.6.0.20 GCC 5.1.0: libstdc++.so.6.0.21 GCC 6.1.0: libstdc++.so.6.0.22 GCC 7.1.0: libstdc++.so.6.0.23 GCC 7.2.0: libstdc++.so.6.0.24 GCC 8.0.0: libstdc++.so.6.0.25
( full list of versions is here )
It is not dependent from how to install gcc - it may be installed from package or compiled and installed from sources.
It is possible that system gcc libraries is available instead of newely installed. So need to specify environment variable where to find libraries for example in command line like this:
$ LD_LIBRARY_PATH=/usr/local/lib64 command args ...
c++ - How to fix: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found - Stack Overflow
libstdc++.so.6: version 'GLIBCXX_3.4.26' not found, even though I do have it
Ubuntu 18.04 LTS - version 'GLIBCXX_3.4.26' not found
How to manually select the libstdc++ library to use to resolve a "version 'GLIBCXX_#.#.##' not found" error?
I had a similar issue. My system had the correct GLIBCXX_3.4.26 version in /usr/lib/x86_64-linux-gnu/libstdc++.so.6, but my conda environment did not:
ImportError: /mnt/nfs/home/[my_username]/miniconda3/envs/myenv/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /usr/lib/x86_64-linux-gnu/libLLVM-12.so.1)
In other similar questions' answers, many people suggested running
conda update libgcc
but my libgcc in my conda environment was already up to date, so this did not solve it.
The solution that fixed it for me was:
conda update libstdcxx-ng
(credit goes to the answer here: scipy not using anaconda's local lib for libgcc).
As far as I understand problem is that your binary first checks system path and you conda path may or may not be on a lookup list.
Following worked for me:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<your lib path> <your binary>
Link statically to libstdc++ with -static-libstdc++ gcc option.
I fixed this issue by installing: sudo apt-get install libstdc++6
In my case, I ran into this issue after installing MongoDB 3.0.1
mongo: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by mongo)
I am trying the test network from Hyperledger fabric and when I run its sample application for Node SDK, I get this error
Error: /snap/core/current/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 'GLIBCXX_3.4.26' not found (required by /home/mashhoodijaz/Desktop/FYP/fabric-samples/asset-transfer-basic/application-javascript/node_modules/pkcs11js/build/Release/pkcs11.node)
But when i run strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC in the /snap/core/current/usr/lib/x86_64-linux-gnu directory, I can see the version available.
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
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_3.4.29
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.14
GLIBC_2.6
GLIBC_2.4
GLIBC_2.18
GLIBC_2.16
GLIBC_2.3.4
GLIBC_2.17
GLIBC_2.3.2
GLIBCXX_DEBUG_MESSAGE_LENGTH
I have Ubuntu 20.04. and gcc -v gives gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
What is causing the issue? Do I have to remove the 26+ versions?
GLIBCXX_3.4.26 comes with gcc-8. Installing gcc-8 and upgrading libstdc++6 worked for me. Run the following as shown here:
sudo apt update
sudo apt install wget gcc-8 unzip libssl1.0.0 software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt-get install --only-upgrade libstdc++6
Not really an answer, but on my Ubuntu 20.04 system, I have package libstdc++6 installed, containing libstdc++.so.6.0.28.
Looking for symbols
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28 | grep GLIBCXX
gives
...
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
...
So, it seems, version 6.0.28 corresponds to symbol 3.4.28.
In your case, you have libstdc++.so.6.0.25 installed, which is just one less than GLIBCXX_3.4.26. So, you must either upgrade the Beagle board, or downgrade the dev environment.
Current (focal, 20.04) libstdc++6 version is 6.0.28. Version 6.0.25 is contained in bionic (18.04), which also contains gcc-8.
So, maybe installing package gcc-8/g++-8 and its dependencies (e.g. libstdc++-8-dev) solves this.
I am using Debian Buster docker container to run some specific c++ binaries. I need gcc-10 compiler, so I installed it from sources with the following script:
mkdir /tmp/$$ && cd /tmp/$$ && curl -s https://ftp.gnu.org/gnu/gcc/gcc-10.3.0/gcc-10.3.0.tar.xz \
| tar xJ && mkdir build && cd build && \
../gcc-10.3.0/configure --prefix=/opt/gcc-10 \
--disable-dependency-tracking \
--disable-nls \
--disable-multilib \
--enable-default-pie \
--enable-languages=c,c++ && \
--enable-shared=
make -j$(nproc) && make install
The compiler is up and running. I compiled my program just fine. But when running the executable, I get an error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 'GLIBCXX_3.4.26' not found. I was checking the latest version present and I am stuck with CLIBCXX_3.4.25. I would assume, that gcc-10 would automatically install this required dependency. Since gcc-10 is not supported for Buster, apt-get install --only-upgrade libstdc++6 says that I already have the newest version. Is there any way for me to install newer version of libstdc++, from sources I assume, so I can run my binaries? I need to install it as a part of my Dockerfile build script, just like I did with gcc-10.