centOS安装mongodb失败

发布于 2022-09-06 01:37:08 字数 9666 浏览 17 评论 0

解压之后在解压目录运行mongod,显示缺少glibc2.14和2.15,于是我安装了2.15,并且将/lib64中指向libc-2.12.so的libc.so.6替换掉,让他指向了libc-2.15.so.
最后按照官网,设置环境变量,失败。于是切换到解压目录下运行mongod 显示如下:

[root@qinyouyi bin]# ./mongod
2017-10-19T10:44:23.540+0000 I CONTROL  [initandlisten] MongoDB starting : pid=15834 port=27017 dbpath=/data/db 64-bit host=qinyouyi
2017-10-19T10:44:23.540+0000 I CONTROL  [initandlisten] db version v3.4.9
2017-10-19T10:44:23.540+0000 I CONTROL  [initandlisten] git version: 876ebee8c7dd0e2d992f36a848ff4dc50ee6603e
2017-10-19T10:44:23.540+0000 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2017-10-19T10:44:23.540+0000 I CONTROL  [initandlisten] allocator: tcmalloc
2017-10-19T10:44:23.540+0000 I CONTROL  [initandlisten] modules: none
2017-10-19T10:44:23.540+0000 I CONTROL  [initandlisten] build environment:
2017-10-19T10:44:23.541+0000 I CONTROL  [initandlisten]     distmod: rhel62
2017-10-19T10:44:23.541+0000 I CONTROL  [initandlisten]     distarch: x86_64
2017-10-19T10:44:23.541+0000 I CONTROL  [initandlisten]     target_arch: x86_64
2017-10-19T10:44:23.541+0000 I CONTROL  [initandlisten] options: {}
2017-10-19T10:44:23.541+0000 W -        [initandlisten] Detected unclean shutdown - /data/db/mongod.lock is not empty.
2017-10-19T10:44:23.562+0000 I -        [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2017-10-19T10:44:23.562+0000 W STORAGE  [initandlisten] Recovering data from the last clean checkpoint.
2017-10-19T10:44:23.562+0000 I STORAGE  [initandlisten] 
2017-10-19T10:44:23.562+0000 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2017-10-19T10:44:23.562+0000 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
2017-10-19T10:44:23.562+0000 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=256M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2017-10-19T10:44:27.569+0000 I CONTROL  [initandlisten] 
2017-10-19T10:44:27.569+0000 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2017-10-19T10:44:27.569+0000 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2017-10-19T10:44:27.569+0000 I CONTROL  [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2017-10-19T10:44:27.569+0000 I CONTROL  [initandlisten] 
2017-10-19T10:44:27.569+0000 I CONTROL  [initandlisten] 
2017-10-19T10:44:27.569+0000 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2017-10-19T10:44:27.569+0000 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2017-10-19T10:44:27.569+0000 I CONTROL  [initandlisten] 
2017-10-19T10:44:27.569+0000 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2017-10-19T10:44:27.569+0000 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2017-10-19T10:44:27.569+0000 I CONTROL  [initandlisten] 
2017-10-19T10:44:27.569+0000 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 3880 processes, 100001 files. Number of processes should be at least 50000.5 : 0.5 times number of files.
2017-10-19T10:44:27.569+0000 I CONTROL  [initandlisten] 
2017-10-19T10:44:27.571+0000 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2017-10-19T10:44:27.572+0000 I NETWORK  [thread1] waiting for connections on port 27017
2017-10-19T10:44:28.097+0000 F -        [ftdc] Invalid access at address: 0x198
2017-10-19T10:44:28.107+0000 F -        [ftdc] Got signal: 11 (Segmentation fault).

 0x7fec000d5551 0x7fec000d4769 0x7fec000d4dd6 0x7febfd8387e0 0x7febfd4cb6b2 0x7febfd4c7921 0x7febfd57af70 0x7fec0028939d 0x7fec00292778 0x7fec00294eba 0x7fec000dea07 0x7febff66b8ca 0x7febff66c9ef 0x7febff754af2 0x7febff749384 0x7febff74cefd 0x7fec00b4be30 0x7febfd830aa1 0x7febfd56826d
----- BEGIN BACKTRACE -----
{"backtrace":[{"b":"7FEBFEB60000","o":"1575551","s":"_ZN5mongo15printStackTraceERSo"},{"b":"7FEBFEB60000","o":"1574769"},{"b":"7FEBFEB60000","o":"1574DD6"},{"b":"7FEBFD829000","o":"F7E0"},{"b":"7FEBFD483000","o":"486B2","s":"__printf_fp"},{"b":"7FEBFD483000","o":"44921","s":"_IO_vfprintf"},{"b":"7FEBFD483000","o":"F7F70","s":"__vsnprintf_chk"},{"b":"7FEBFEB60000","o":"172939D","s":"_ZN16TCMalloc_Printer6printfEPKcz"},{"b":"7FEBFEB60000","o":"1732778"},{"b":"7FEBFEB60000","o":"1734EBA","s":"_ZN22TCMallocImplementation8GetStatsEPci"},{"b":"7FEBFEB60000","o":"157EA07"},{"b":"7FEBFEB60000","o":"B0B8CA","s":"_ZNK5mongo19ServerStatusSection13appendSectionEPNS_16OperationContextERKNS_11BSONElementEPNS_14BSONObjBuilderE"},{"b":"7FEBFEB60000","o":"B0C9EF","s":"_ZN5mongo15CmdServerStatus3runEPNS_16OperationContextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_7BSONObjEiRS8_RNS_14BSONObjBuilderE"},{"b":"7FEBFEB60000","o":"BF4AF2"},{"b":"7FEBFEB60000","o":"BE9384","s":"_ZN5mongo23FTDCCollectorCollection7collectEPNS_6ClientE"},{"b":"7FEBFEB60000","o":"BECEFD","s":"_ZN5mongo14FTDCController6doLoopEv"},{"b":"7FEBFEB60000","o":"1FEBE30"},{"b":"7FEBFD829000","o":"7AA1"},{"b":"7FEBFD483000","o":"E526D","s":"clone"}],"processInfo":{ "mongodbVersion" : "3.4.9", "gitVersion" : "876ebee8c7dd0e2d992f36a848ff4dc50ee6603e", "compiledModules" : [], "uname" : { "sysname" : "Linux", "release" : "2.6.32-642.6.2.el6.x86_64", "version" : "#1 SMP Wed Oct 26 06:52:09 UTC 2016", "machine" : "x86_64" }, "somap" : [ { "b" : "7FEBFEB60000", "elfType" : 3, "buildId" : "66D794A7825BE408EBA4D234567709475FE55C89" }, { "b" : "7FFEB4CCD000", "elfType" : 3, "buildId" : "F19AA6D32E36D9FB2A754E6499A6C4F568C419FB" }, { "b" : "7FEBFE6D1000", "path" : "/usr/lib64/libssl.so.10", "elfType" : 3, "buildId" : "BECFB85A8BC084042D5BF2BA9E66325CE798B659" }, { "b" : "7FEBFE2EC000", "path" : "/usr/lib64/libcrypto.so.10", "elfType" : 3, "buildId" : "CBDA444A7109874C5350AE9CEEF3F82F749B347F" }, { "b" : "7FEBFE0E4000", "path" : "/lib64/librt.so.1", "elfType" : 3, "buildId" : "FDF3A36FFFE08375456D59DA959EAB2FC30B6186" }, { "b" : "7FEBFDEE0000", "path" : "/lib64/libdl.so.2", "elfType" : 3, "buildId" : "1F7E85410384392BC51FA7324961719A10125F31" }, { "b" : "7FEBFDC5C000", "path" : "/lib64/libm.so.6", "elfType" : 3, "buildId" : "8A852AC42F0B64F0F30C760EBBCFA3FE4A228F12" }, { "b" : "7FEBFDA46000", "path" : "/lib64/libgcc_s.so.1", "elfType" : 3, "buildId" : "BC7550A8A7C2D706FE4E489058BADC963465DBB7" }, { "b" : "7FEBFD829000", "path" : "/lib64/libpthread.so.0", "elfType" : 3, "buildId" : "85104ECFE42C606B31C2D0D0D2E5DACD3286A341" }, { "b" : "7FEBFD483000", "path" : "/lib64/libc.so.6", "elfType" : 3, "buildId" : "16B83F032A7F2980EC5D2DAECDBEF2CB9FA17DAF" }, { "b" : "7FEBFE93D000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3, "buildId" : "1CC2165E019D43F71FDE0A47AF9F4C8EB5E51963" }, { "b" : "7FEBFD23F000", "path" : "/lib64/libgssapi_krb5.so.2", "elfType" : 3, "buildId" : "9A737F8BF10FC99C37CC404D3FC188F6E11FEDD9" }, { "b" : "7FEBFCF58000", "path" : "/lib64/libkrb5.so.3", "elfType" : 3, "buildId" : "8D3D6E28DF6EB3752642A7031AAC17D39EA4265D" }, { "b" : "7FEBFCD54000", "path" : "/lib64/libcom_err.so.2", "elfType" : 3, "buildId" : "57F77704A7F1F4E3689D028D3F9ADD4E77486EC9" }, { "b" : "7FEBFCB28000", "path" : "/lib64/libk5crypto.so.3", "elfType" : 3, "buildId" : "CC89B4C8CDCCD32BA610BC72784DC3B7E9BD9E19" }, { "b" : "7FEBFC912000", "path" : "/lib64/libz.so.1", "elfType" : 3, "buildId" : "5FA8E5038EC04A774AF72A9BB62DC86E1049C4D6" }, { "b" : "7FEBFC707000", "path" : "/lib64/libkrb5support.so.0", "elfType" : 3, "buildId" : "E0C522C589F775C324330BE09CE67DC83950A213" }, { "b" : "7FEBFC504000", "path" : "/lib64/libkeyutils.so.1", "elfType" : 3, "buildId" : "AF374BAFB7F5B139A0B431D3F06D82014AFF3251" }, { "b" : "7FEBFC2EA000", "path" : "/lib64/libresolv.so.2", "elfType" : 3, "buildId" : "F0BE1166EDCFFB2422B940D601A1BBD89352D80F" }, { "b" : "7FEBFC0CB000", "path" : "/lib64/libselinux.so.1", "elfType" : 3, "buildId" : "B4576BE308DDCF7BC31F7304E4734C3D846D0236" } ] }}
 mongod(_ZN5mongo15printStackTraceERSo+0x41) [0x7fec000d5551]
 mongod(+0x1574769) [0x7fec000d4769]
 mongod(+0x1574DD6) [0x7fec000d4dd6]
 libpthread.so.0(+0xF7E0) [0x7febfd8387e0]
 libc.so.6(__printf_fp+0xB22) [0x7febfd4cb6b2]
 libc.so.6(_IO_vfprintf+0x2931) [0x7febfd4c7921]
 libc.so.6(__vsnprintf_chk+0xB0) [0x7febfd57af70]
 mongod(_ZN16TCMalloc_Printer6printfEPKcz+0xBD) [0x7fec0028939d]
 mongod(+0x1732778) [0x7fec00292778]
 mongod(_ZN22TCMallocImplementation8GetStatsEPci+0x5A) [0x7fec00294eba]
 mongod(+0x157EA07) [0x7fec000dea07]
 mongod(_ZNK5mongo19ServerStatusSection13appendSectionEPNS_16OperationContextERKNS_11BSONElementEPNS_14BSONObjBuilderE+0x3A) [0x7febff66b8ca]
 mongod(_ZN5mongo15CmdServerStatus3runEPNS_16OperationContextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_7BSONObjEiRS8_RNS_14BSONObjBuilderE+0xF2F) [0x7febff66c9ef]
 mongod(+0xBF4AF2) [0x7febff754af2]
 mongod(_ZN5mongo23FTDCCollectorCollection7collectEPNS_6ClientE+0x3E4) [0x7febff749384]
 mongod(_ZN5mongo14FTDCController6doLoopEv+0x27D) [0x7febff74cefd]
 mongod(+0x1FEBE30) [0x7fec00b4be30]
 libpthread.so.0(+0x7AA1) [0x7febfd830aa1]
 libc.so.6(clone+0x6D) [0x7febfd56826d]
-----  END BACKTRACE  -----
Segmentation fault (core dumped)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

木有鱼丸 2022-09-13 01:37:08

glibc是系统的非常重要的库,最好不要动他。
你可以试试使用清华大学的mongodb的yum源,安装mongodb数据库。

有可能是你安装的mongodb数据库所需要的系统版本,和你的系统版本不一样。比如你下载的是centos 7的mongodb,你系统是centos 6的。

梦中的蝴蝶 2022-09-13 01:37:08

请你不要在意这些错误 libc.so.6 libpthread.so.0 libc.so.6

冰葑 2022-09-13 01:37:08

我一般都推荐大家使用源来安装MongoDB,原因就是可能遇到这些奇怪的问题。安装步骤在文档有中详细的说明,请参考:Install MongoDB Community Edition on Red Hat Enterprise or CentOS Linux

扮仙女 2022-09-13 01:37:08

你可用yum来安装啊!就没有这么多麻烦事了。mongodb官网还有教程。

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文