centos缺少共享库:libstdc++.so.6
centos缺少共享库:libstdc++.so.6
执行某些命令时,有缺少共享库的报错:
error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
解决办法:
1、执行命令: yum whatprovides libstdc++.so.6
admin@rocketmq-master1 ~]# yum whatprovides libstdc++.so.6
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: tlinux-mirror.tencent-cloud.com
* cr: tlinux-mirror.tencent-cloud.com
* fasttrack: tlinux-mirror.tencent-cloud.com
* tlinux: tlinux-mirror.tencent-cloud.com
* tlinux-debuginfo: tlinux-mirror.tencent-cloud.com
* updates: tlinux-mirror.tencent-cloud.com
base | 2.7 kB 00:00
cr | 3.0 kB 00:00
fasttrack | 3.5 kB 00:00
tlinux | 3.2 kB 00:00
tlinux/primary_db | 589 kB 00:00
tlinux-debuginfo | 3.2 kB 00:00
tlinux-debuginfo/primary_db | 34 kB 00:00
updates | 3.6 kB 00:00
libstdc++-4.4.6-3.el6.i686 : GNU Standard C++ Library
Repo : base
Matched from:
Other : libstdc++.so.6
libstdc++-4.4.6-4.tl1.i686 : GNU Standard C++ Library
Repo : tlinux
Matched from:
Other : libstdc++.so.6
libstdc++-4.4.6-4.tl1.i686 : GNU Standard C++ Library
Repo : installed
Matched from:
Other : Provides-match: libstdc++.so.6
2.yum install -y libstdc++-4.4.6-4.tl1.i686
如果系统中存在低版本的64位库,则会因为版本不一致而报错
报错:
--> Finished Dependency Resolution
Error: Protected multilib versions: libstdc++-4.4.6-4.el6.i686 != libstdc++-4.4.6-3.el6.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
可先升级相应64位库再安安装32位库
yum update libstdc++-4.4.6-3.el6.x86_64
本文出自 “运维者说:从菜鸟到老鸟” 博客,请务必保留此出处http://liuqunying.blog.51cto.com/3984207/1624688
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。