找不到 /usr/lib64/libstdc++.so.6

cannot find /usr/lib64/libstdc++.so.6

我刚刚将我的gcc更新到4.7.2,但是当我安装R包时,它报告错误(如下)但它需要的文件实际上在那里。有什么办法吗?

/opt/centos/devtoolset-1.1/root/usr/libexec/gcc/x86_64-CentOS-linux/4.7.2/ld: cannot find /usr/lib64/libstdc++.so.6
collect2: error: ld returned 1 exit status
make: *** [RcppArmadillo.so] Error 1
ERROR: compilation failed for package 'RcppArmadillo'

[jingyi@CMP ~]$ ll /usr/lib64/libstdc++.so.6*
lrwxrwxrwx 1 root root     19 Mar  5 21:49 /usr/lib64/libstdc++.so.6 -> libstdc++.so.6.0.13
-rw-r--r-- 1 root root 975088 Feb 27  2014 /usr/lib64/libstdc++.so.6.0.13
-rwxr-xr-x 1 root root 976312 Jan  9  2013 /usr/lib64/libstdc++.so.6.0.8

我怀疑这是失败的原因,但你的 /usr/lib64/libstdc++.so.6.0.13 文件确实应该有 755 个权限

忽略它,您的工具链路径在 /opt/centos/devtoolset-1.1/root/ 下。也许检查该根目录下是否有 libstdc++ 文件。即 /opt/centos/devtoolset-1.1/root/usr/lib64/libstdc++.so*

如果仍然失败,请尝试 运行 strace -f -o log 下的命令,看看它是否向您显示它正在寻找的实际路径。