千家信息网

mongod: error while loading shared libraries: libstdc++.so.6

发表于:2025-01-22 作者:千家信息网编辑
千家信息网最后更新 2025年01月22日,mongod: error while loading shared libraries: libstdc++.so.6环境说明:OS:Oracle Linux Server release 6.3D
千家信息网最后更新 2025年01月22日mongod: error while loading shared libraries: libstdc++.so.6

mongod: error while loading shared libraries: libstdc++.so.6

环境说明:

OS:Oracle Linux Server release 6.3

DB:MongoDB 1.8.2

问题:

mongod安装后启动失败。

[mongo@cjcos01 ~]$ mongod -config /usr/local/mongodb/conf/mongodb.confmongod: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

检查缺少哪些包:

[root@cjcos01 os]# yum whatprovides libstdc++.so.6

Loaded plugins: refresh-packagekit, security

libstdc++-4.4.6-4.el6.i686 : GNU Standard C++ Library

Repo : Oralin6u3

Matched from:

Other : libstdc++.so.6

安装libstdc++-4.4.6-4.el6.i686:

[root@cjcos01 os]# yum install libstdc++-4.4.6-4.el6.i686

再次启动mongod,可以正常启动:

[root@cjcos01 os]# su - mongo

[mongo@cjcos01 ~]$ mongod -config /usr/local/mongodb/conf/mongodb.conf

[mongo@cjcos01 ~]$ forked process: 15819

all output going to: /usr/local/mongodb/log/mongodb.log

登录mongo:

[root@cjcos01 os]# su - mongo

[mongo@cjcos01 ~]$ mongo

MongoDB shell version: 1.8.2connecting to: test> show dbs;admin(empty)cjc0.0625GBlocal(empty)

欢迎关注我的微信公众号"IT小Chen",共同学习,共同成长!!!

0