/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found错误的解决
升级cmake时,提示“Error when bootstrapping CMake:Problem while running initial CMake”,第二次运行./bootstrap时,直接的给出了错误原因:
1 | [root@localhost cmake-2.8.12.2]# ./bootstrap |
缺少GLIBCXX_3.4.15版本,或是更高的版本。
为了核实版本问题:
1 | [root@localhost cmake-2.8.12.2]# strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX |
我们看到当前GCC版本中的确没有GLIBCXX_3.4.15,考虑到刚安装过新版的GCC,似乎不应该出现这样的问题。
顺着gcc安装路径,找到了新的libstdc++:
1 | [root@localhost cmake-2.8.12.2]# strings /usr/local/lib64/libstdc++.so.6.0.20|grep GLIBCXX |
这里该有的都有了,把这份软链到正确的地方,就妥了。
1 | [root@localhost cmake-2.8.12.2]# cp /usr/local/lib64/libstdc++.so.6.0.20 /usr/lib64/ |
此后,再进行编译安装就顺畅了:
./bootstrap
gmake
make install
本文介绍了在升级CMake过程中遇到的“/usr/lib/libstdc++.so.6:version `GLIBCXX_3.4.15' not found”错误,并详细记录了解决过程,包括如何确认缺失的GLIBCXX版本及通过替换libstdc++文件解决问题。
1万+

被折叠的 条评论
为什么被折叠?



