0
我試圖在我的Mac上安裝MongoDB,運行Yosemite。我下載蒙戈使用在Mac上安裝和運行MongoDB時遇到困難
$ curl -O http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.6.4.tgz
打開包裝:
$ tar -zxvf mongodb-osx-x86_64-2.6.4.tgz
改名目錄:
$ mv mongodb-osx-x86_64-2.6.4 mongodb
創建的數據/ db目錄:
$ mkdir -p /data/db
設置文件夾的權限:
$ chown -R $USER /data/db
到目前爲止,這麼好。現在我想運行它。所以:
$ cd mongodb/bin
$ mongod
而且我得到所有這些錯誤:
2015-06-20T18:35:18.558-0700 [initandlisten] MongoDB starting : pid=589 port=27017 dbpath=/data/db 64-bit host=Brian-ONeills-iMac.local
2015-06-20T18:35:18.558-0700 [initandlisten]
2015-06-20T18:35:18.558-0700 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
2015-06-20T18:35:18.558-0700 [initandlisten] db version v2.6.4
2015-06-20T18:35:18.558-0700 [initandlisten] git version: 3a830be0eb92d772aa855ebb711ac91d658ee910
2015-06-20T18:35:18.558-0700 [initandlisten] build info: Darwin bs-osx108-4 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
2015-06-20T18:35:18.558-0700 [initandlisten] allocator: system
2015-06-20T18:35:18.558-0700 [initandlisten] options: {}
2015-06-20T18:35:18.639-0700 [initandlisten] journal dir=/data/db/journal
2015-06-20T18:35:18.639-0700 [initandlisten] recover : no journal files present, no recovery needed
2015-06-20T18:35:18.994-0700 [initandlisten] preallocateIsFaster=true 5.28
2015-06-20T18:35:19.811-0700 [initandlisten] ****
2015-06-20T18:35:19.811-0700 [initandlisten] ****
2015-06-20T18:35:19.811-0700 [initandlisten] need to upgrade database local with pdfile version 4.22, new version: 4.5
2015-06-20T18:35:19.811-0700 [initandlisten] Not upgrading, exiting
2015-06-20T18:35:19.811-0700 [initandlisten] run --upgrade to upgrade dbs, then start again
2015-06-20T18:35:19.811-0700 [initandlisten] ****
2015-06-20T18:35:19.811-0700 [initandlisten] dbexit:
2015-06-20T18:35:19.811-0700 [initandlisten] shutdown: going to close listening sockets...
2015-06-20T18:35:19.811-0700 [initandlisten] shutdown: going to flush diaglog...
2015-06-20T18:35:19.811-0700 [initandlisten] shutdown: going to close sockets...
2015-06-20T18:35:19.811-0700 [initandlisten] shutdown: waiting for fs preallocator...
2015-06-20T18:35:19.811-0700 [initandlisten] shutdown: lock for final commit...
2015-06-20T18:35:19.811-0700 [initandlisten] shutdown: final commit...
2015-06-20T18:35:19.811-0700 [initandlisten] shutdown: closing all files...
2015-06-20T18:35:19.811-0700 [initandlisten] closeAllFiles() finished
2015-06-20T18:35:19.811-0700 [initandlisten] journalCleanup...
2015-06-20T18:35:19.811-0700 [initandlisten] removeJournalFiles
2015-06-20T18:35:19.812-0700 [initandlisten] shutdown: removing fs lock...
2015-06-20T18:35:19.812-0700 [initandlisten] dbexit: really exiting now
任何想法可能是什麼回事,如何解決?
在此先感謝!
您是否嘗試按照消息中的建議運行'mongod --upgrade'?看起來你有一個來自舊版本MongoDB的數據文件。 – Stennie
我還會注意到,輸出中唯一的錯誤是您的數據文件是使用舊版本的MongoDB創建的(這會導致MongoDB關閉,因此您可以升級數據文件)。前面輸出的其餘部分是關於啓動順序的正常消息。 – Stennie
你解決了這個問題嗎?如果是這樣,你可以通過分享你如何解決它來幫助社區嗎? – kramer65