分享

解决CentOS缺少共享库:libstdc++.so.6

 instl 2015-12-02

当在CentOS 6.2下执行某些命令时,有缺少共享库的报错:
 
error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

解决办法:
 1、执行命令: yum whatprovides libstdc++.so.6
 
然后会提示哪个安装包有这个库文件如下:
 
[root@localhost ~]# yum whatprovides libstdc++.so.6
 Loaded plugins: aliases, changelog, downloadonly, fastestmirror, kabi, presto, refresh-packagekit, security, tmprepo, verify,
              : versionlock
 Loading support for CentOS kernel ABI
 Loading mirror speeds from cached hostfile
  * base: centos.ustc.edu.cn
  * centosplus: centos.ustc.edu.cn
  * contrib: centos.ustc.edu.cn
  * extras: centos.ustc.edu.cn
  * updates: centos.ustc.edu.cn
 libstdc++-4.4.7-3.el6.i686 : GNU Standard C++ Library
 Repo        : base
 Matched from:
 Other      : libstdc++.so.6

2、然后执行:
 
yum install libstdc++-4.4.7-3.el6.i686

搞定!

更多CentOS相关信息见CentOS 专题页面 http://www./topicnews.aspx?tid=14

linux

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多