How to solve error on CentOS "/lib64/libstdc++.so.6 version GLIBCXX_3.4.xx...
source link: https://amonxu.com/2023/10/11/en/2023-10-11-CentOS-Error-libstdc++.so.6-version-GLIBCXX_3.4.xx-not-found/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How to solve error on CentOS "/lib64/libstdc++.so.6 version GLIBCXX_3.4.xx not found"
2023-10-11 0 Comments
My personal server uses CentOS 7.9
, and there are often strange errors when deploying some AI applications.
For example, recently, an error was reported when deploying an application:
/lib64/libstdc++.so.6: version GLIBCXX_3.4.xx not found
Online search for solutions, there are different opinions, either reinstall gcc
, or recompile and install libstdc++
,export LD_LIBRARY_PATH
and so on.
Several attempts have failed, and there is no way to upgrade the os version. Finally, a suitable solution is found, and it’s worked for me.
- Find and display all packages that provide
libstdc++.so.6
as a library file through yum
sudo yum provides libstdc++.so.6
- Download new version
libstdc.so
.
NOTICE: Since I need version
3.4.22+
, so I can just update it to3.4.26
. Other versions are the same.
cd /usr/local/lib64
sudo wget http://www.vuln.cn/wp-content/uploads/2019/08/libstdc.so_.6.0.26.zip
unzip libstdc.so_.6.0.26.zip
- Copy
libstdc++.so.6.0.26
to/usr/lib64
cp libstdc++.so.6.0.26 /usr/lib64
cd /usr/lib64
- Check the soft link version of
libstdc++.so.6
,
ls -l | grep libstdc++
It may shows like this:
libstdc++.so.6 ->libstdc++.so.6.0.19
- Remove /usr/lib64 original link libstdc++.so.6, you can backup it before remove.
sudo rm libstdc++.so.6
then, relink it.
sudo ln -s libstdc++.so.6.0.26 libstdc++.so.6
- OK, check the newest link
strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX
It may shows like this:
GLIBCXX_3.4
...
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_DEBUG_MESSAGE_LENGTH
Well Done!
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK