CentOS中遇到CXXABI_1.3.8 not found的解决方式
2023年11月2日 - 由Bo 0 评论 488 阅读
在centos中有个web服务在启动时遇到了错误提示:”/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found“
先用命令看了下目前已有的CXXABI版本:strings /usr/lib64/libstdc++.so.6 | grep CXXABI,发现最高直到1.3.7,看来是引用的lib需求的1.3.8是满足不了了。
CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_1.3.3
CXXABI_1.3.4
CXXABI_1.3.5
CXXABI_1.3.6
CXXABI_1.3.7
CXXABI_TM_1
搜索了网上几种方式,都不行,最后是混合他们的解决思路搞定了。按下面的命令先执行一次:
yum install gmp-devel mpfr-devel libmpc-devel wget
wget https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.gz
tar zxf gcc-9.2.0.tar.gz
cd gcc-9.2.0
./configure --disable-multilib --enable-languages=c,c++ --prefix=$HOME/local
make && make install
# export命令是无效的,只列在这里 export LD_LIBRARY_PATH=/usr/local/lib64:${LD_LIBRARY_PATH}
# make这里会花点时间,执行完成后用find命令找一下,再查看其中CXXABI版本,复制文件
find / -name "libstdc++.so*"
sudo unlink /usr/lib64/libstdc++.so.6
sudo cp /root/local/lib64/libstdc++.so.6.0.27 /usr/lib64/libstdc++.so.6
strings /usr/lib64/libstdc++.so.6 | grep CXXABI
这个时候查看的内容就包含了更新的版本号:
CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_1.3.3
CXXABI_1.3.4
CXXABI_1.3.5
CXXABI_1.3.6
CXXABI_1.3.7
CXXABI_1.3.8
CXXABI_1.3.9
CXXABI_1.3.10
CXXABI_1.3.11
CXXABI_1.3.12
CXXABI_TM_1
CXXABI_FLOAT128
CXXABI_1.3
CXXABI_1.3.11
CXXABI_1.3.2
CXXABI_1.3.6
CXXABI_FLOAT128
CXXABI_1.3.12
CXXABI_1.3.9
CXXABI_1.3.1
CXXABI_1.3.5
CXXABI_1.3.8
CXXABI_1.3.4
CXXABI_TM_1
CXXABI_1.3.7
CXXABI_1.3.10
CXXABI_1.3.3