啟動(dòng)MongoDB時(shí),提示:
error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
[root@SnsWeb ~]# /usr/local/mongodb/bin/mongod --dbpath=/usr/local/mongodb/data --logpath /usr/local/mongodb/logs/mongodb.log --fork
/usr/local/mongodb/bin/mongod: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
[root@SnsWeb ~]#
報(bào)錯(cuò)原因:缺少libstdc++.so.6運(yùn)行庫(kù)
解決方案:安裝libstdc++.so.6運(yùn)行庫(kù)
1、執(zhí)行命令
yum whatprovides libstdc++.so.6
然后會(huì)提示哪個(gè)安裝包有這個(gè)庫(kù)文件,如下:
[root@SnsWeb ~]# yum whatprovides libstdc++.so.6
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
libstdc++-4.4.7-11.el6.i686 : GNU Standard C++ Library
Repo : base
Matched from:
Other : libstdc++.so.6
2、然后執(zhí)行
yum -y install libstdc++-4.4.7-11.el6.i686
非常簡(jiǎn)單,工作中系統(tǒng)或軟件會(huì)出現(xiàn)各種問(wèn)題,不要急著去問(wèn)百度,試著去閱讀一下錯(cuò)誤提示,自己根據(jù)錯(cuò)誤提示來(lái)解決相關(guān)問(wèn)題,如果是英文的還能提高你的英文閱讀水平
您可能感興趣的文章:- C++基于灰度圖上色GrayToColorFromOther的實(shí)現(xiàn)
- C++11中std::move、std::forward、左右值引用、移動(dòng)構(gòu)造函數(shù)的測(cè)試問(wèn)題
- 實(shí)例分享cmake編譯一個(gè)簡(jiǎn)單c++項(xiàng)目(demo)
- 詳解c++種gmock單元測(cè)試框架
- C++11中value category(值類別)及move semantics(移動(dòng)語(yǔ)義)的介紹
- C++ move()函數(shù)案例詳解