【发布时间】:2017-09-12 09:20:53
【问题描述】:
我知道这个问题已经被问过很多次了,但我仍然被它困住了。 我已经查看了之前提出的所有答案,例如 version `CXXABI_1.3.8' not found (required by ...)
我读过https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.how_to_set_paths
我的系统是RHEL7,之前安装了gcc 4.8,我用yum -y install devtoolset-3-gcc devtoolset-3-gcc-c++安装gcc 4.9
那么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 不起作用。 任何帮助,将不胜感激!
【问题讨论】: