[英]Trouble installing mongodb using Homebrew
我正試着讓Mongo跑步。
我安裝了包管理器Homebrew
然后我使用了Mongo站點上的命令:
$ brew update
$ brew install mongodb
這似乎安裝正確。
我在一個新的終端窗口中輸入了mongo
並收到以下錯誤:
MongoDB shell version: 2.0.1
connecting to: test
Thu Dec 15 09:37:25 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:84
exception: connect failed
所以我接着按照這里的說明進行操作
Ran mongod
,這是結果:
mongod --help for help and startup options
Thu Dec 15 09:38:49 [initandlisten] MongoDB starting : pid=7364 port=27017 dbpath=/data/db/ 64-bit host=Mike-Fieldens-iMac.local
Thu Dec 15 09:38:49 [initandlisten] db version v2.0.1, pdfile version 4.5
Thu Dec 15 09:38:49 [initandlisten] git version: 3a5cf0e2134a830d38d2d1aae7e88cac31bdd684
Thu Dec 15 09:38:49 [initandlisten] build info: Darwin erh2.10gen.cc 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40
Thu Dec 15 09:38:49 [initandlisten] options: {}
Thu Dec 15 09:38:49 [initandlisten] exception in initAndListen: 10296 dbpath (/data/db/) does not exist, terminating
Thu Dec 15 09:38:49 dbexit:
Thu Dec 15 09:38:49 [initandlisten] shutdown: going to close listening sockets...
Thu Dec 15 09:38:49 [initandlisten] shutdown: going to flush diaglog...
Thu Dec 15 09:38:49 [initandlisten] shutdown: going to close sockets...
Thu Dec 15 09:38:49 [initandlisten] shutdown: waiting for fs preallocator...
Thu Dec 15 09:38:49 [initandlisten] shutdown: lock for final commit...
Thu Dec 15 09:38:49 [initandlisten] shutdown: final commit...
Thu Dec 15 09:38:49 [initandlisten] shutdown: closing all files...
Thu Dec 15 09:38:49 [initandlisten] closeAllFiles() finished
Thu Dec 15 09:38:49 dbexit: really exiting now
請注意,“initAndListen”存在異常,然后關閉。
我究竟做錯了什么? 如何修復此安裝並啟動並運行Mongo?
這就是問題:
15 09:38:49 [initandlisten] exception in initAndListen: 10296 dbpath (/data/db/) does not exist, terminating
Thu Dec 15 09:38:49 dbexit:
在您的系統上創建路徑/data/db
,它將工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.