加入收藏 | 设为首页 | 会员中心 | 我要投稿 东莞站长网 (https://www.0769zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

linux – RHEL7 – /usr/lib64 / libstdc .so.6:版本“CXXABI_1

发布时间:2020-12-31 09:29:10 所属栏目:Linux 来源:网络整理
导读:我知道这个问题已被多次询问,而我仍然坚持使用它. 我已经回顾了以前问过的所有答案 version `CXXABI_1.3.8′ not found (required by …) How to fix: [program name] /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version CXXABI_1.3.8′ not found (require

我知道这个问题已被多次询问,而我仍然坚持使用它.
我已经回顾了以前问过的所有答案
version `CXXABI_1.3.8′ not found (required by …)

How to fix: [program name] /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version CXXABI_1.3.8′ not found (required by [program name])

我读过https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.how_to_set_paths

我的系统是RHEL7,之前安装了gcc 4.8,我用yum安装了gcc 4.9 -y install devtoolset-3-gcc devtoolset-3-gcc-c

然后成功安装了gcc 4.9.
用gcc -v,我明白了

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/opt/rh/devtoolset-3/root/usr --mandir=/opt/rh/devtoolset-3/root/usr/share/man --infodir=/opt/rh/devtoolset-3/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC)

然后我按照其他人的建议设置我的LD_LIBRARY_PATH,如:

export LD_LIBRARY_PATH=/opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2:${LD_LIBRARY_PATH}

但是,错误仍然存??在,似乎我的新版本gcc4.9不起作用.
任何帮助,将不胜感激!

解决方法

问题出现了,因为devtoolset-x软件包实际上只是包装标准系统libstdc.所以即使你有一个新的编译器,你仍然有旧的ABI(应用程序二进制接口).所以你真正需要的是一个全新的编译器!其中将包括自己的新库.

要构建编译器,您需要安装一些依赖项:

sudo yum install gmp-devel mpfr-devel libmpc-devel

您可以下载更新版本的GCC from one of the official mirrors,获取gcc-8.3.0.tar.gz等版本,解压缩并在该目录中

./configure --disable-multilib --enable-languages=c,c++ --prefix=$HOME/local
make -j5
make -j install

那么每当你需要一个现代的ABI,

export LD_LIBRARY_PATH=$HOME/local/lib64

一切都可能开始奏效.如果您的应用程序生成自己的环境(例如Steam),您可能希望将库放在它正在搜索的路径中.

“重复”的答案要么错了,要么过时了;这是今天的正确解决方案.我知道因为我尝试了所有这些,这才是真正有效的……

(编辑:东莞站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读