CentOS缺少libstdc++.so.5问题

2014-09-04 summer 更多博文 » 博客 » GitHub »

centos question

原文链接 http://fee.im/2014/09/centos-libstdc-so.5/
注:以下为加速网络访问所做的原文缓存,经过重新格式化,可能存在格式方面的问题,或偶有遗漏信息,请以原文为准。


今天在centos系统上执行命令是出现错误,error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory.如下图所示: error

解决办法: 1、执行命令yum whatprovides libstdc++.so.5,然后会提示哪个安装包有这个库文件如下:

[root@cluster ~]# yum whatprovides libstdc++.so.5
compat-libstdc++-33-3.2.3-69.el6.i686 : Compatibility standard C++ libraries
Repo        : base
Matched from:
Other       : libstdc++.so.5



libstdc++5-3.3.6-8.mga3.x86_64 : GNU C++ library
Repo        : Rocks-6.1
Matched from:
Other       : libstdc++.so.5



compat-libstdc++-33-3.2.3-69.el6.i686 : Compatibility standard C++ libraries
Repo        : Rocks-6.1
Matched from:
Other       : libstdc++.so.5

2、然后执行:

yum install compat-libstdc++-33-3.2.3-69.el6.i686 

解决。 ok