简体   繁体   中英

Errors installing MongoDB

I have been trying to get MongoDB running on my Mac for the past week with no success on my work computer and home computer.

This is what I get on my work computer:

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

This is what I get on my home computer:

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.

In Mac OS X I'll recommend installing mongodb using Homebrew .

Then you can install mongodb with:

$ brew install mongodb

And manage the the service directly through homebrew with:

$ brew services start mongodb

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM