2014-02-18 64 views
0

我一直在試圖讓MongoDB在我的Mac上運行過去一週,在我的工作計算機和家用電腦上沒有成功。安裝MongoDB的錯誤

這是我得到我的工作電腦上:

You should install the latest version from: http://connect.apple.com 
    ==> Downloading http://fastdl.mongodb.org/osx/mongodb-osx-x86_64-2.4.5.tgz 
    ######################################################################## 100.0% 
==> Caveats 
To have launchd start mongodb at login: 
    ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents 
Then to load mongodb now: 
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist 
Or, if you don't want/need launchctl, you can just run: 
    mongod 
==> Summary 
    /usr/local/Cellar/mongodb/2.4.5: 20 files, 287M, built in 46 seconds 
HighRanks-iMac-2:~ highrankwebsites$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist 
launchctl: Couldn't stat("/Users/highrankwebsites/Library/LaunchAgents/homebrew.mxcl.mongodb.plist"): No such file or directory 
nothing found to load 

這是我得到我的家用電腦:

all output going to: /usr/local/var/log/mongodb/mongo.log 
can't open [/usr/local/var/log/mongodb/mongo.log] for log file: errno:13 Permission denied 
Bad logpath value: "/usr/local/var/log/mongodb/mongo.log"; terminating. 
+0

你做符號鏈接? –

+0

你用''sudo''運行過嗎? – 2014-02-18 18:59:13

+0

您確認/ usr/local/var/log/mongodb /存在,並且您有寫入權限嗎? – aleatha

回答

0

在Mac OS X中,我會建議使用Homebrew安裝的MongoDB 。

然後你就可以安裝使用的MongoDB:

$ brew install mongodb 

,並直接通過與自制管理服務:

$ brew services start mongodb