安装MongoDB的错误

时间:2014-02-18 17:35:29

标签: javascript 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.

1 个答案:

答案 0 :(得分:0)

在Mac OS X中,我建议使用Homebrew安装mongodb。

然后你可以用:

安装mongodb
$ brew install mongodb

直接通过自制软件管理服务:

$ brew services start mongodb