Reputation: 627
I am trying to change libstdc++.so.6 from 4.8.3 to 3.4.20.
Why am I doing this? Due to this error:
File "", line 1, in ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /var/lang/lib/python3.6/site-packages/lgraph.cpython-36m-x86_64-linux-gnu.so)
Therefore, I assumed I would have to update the version. (I tried installing gcc-8.0.1 as well but either it didn't install correctly, simply did not work).
Architecture: 2018 x86_64 x86_64 x86_64 GNU/Linux
Information:
$ bash-4.2# yum info gcc-c++
Installed Packages
Name : gcc-c++
Arch : noarch
Version : 4.8.3
Release : 3.20.amzn1
Size : 0.0
Repo : installed
From repo : amzn-main
Summary : C++ support for GCC
I also ran this command:
bash-4.2# /sbin/ldconfig -p | grep stdc++
libstdc++.so.6 (libc6,x86-64) => /usr/lib64/libstdc++.so.6
libstdc++.so (libc6,x86-64) => /usr/lib64/libstdc++.so
By the way, I am doing all of this on a docker container (If that matters). The program/package I am running was built on:
Information:
Architecture: CEST 2018 x86_64 GNU/Linux
server:~$/sbin/ldconfig -p | grep stdc++
libstdc++.so.6 (libc6,x86-64) => /usr/lib/libstdc++.so.6
libstdc++.so.6 (libc6) => /usr/lib32/libstdc++.so.6
libstdc++.so.5 (libc6) => /usr/lib32/libstdc++.so.5
libstdc++.so (libc6,x86-64) => /usr/lib/libstdc++.so
libstdc++.so (libc6) => /usr/lib32/libstdc++.so
server:~$gcc --version
gcc (GCC) 8.1.1 20180531
Upvotes: 1
Views: 5561
Reputation: 627
I fixed this issue by manually installing gcc-8.0.1 on my docker container and adding the correct path to LD_LIBRARY_PATH
.
Upvotes: 0
Reputation: 249394
The easiest way to fix this is to build using an older GCC installation (e.g. GCC 4.8 like the machine where you run). Another way is to simply copy the required libraries to the machine where you run, and put the path to them in the environment variable LD_LIBRARY_PATH
.
Upvotes: 1