brew install mongodb error: Cowardly refusing to `sudo brew install' Mac OSX Lion

前端 未结 3 978
天涯浪人
天涯浪人 2020-12-23 15:00

I am not sure why I\'m getting this error:

$ brew install mongodb
==> Downloading http://fastdl.mongodb.org/osx/mongodb-osx-x86_64-2.0.4.tgz
#############         


        
3条回答
  •  不知归路
    2020-12-23 15:27

    The lazy (brew) way:

    ls -al /usr/local/bin/brew #confirm brew ownership
    sudo chown root:wheel /usr/local/bin/brew
    sudo brew install mongodb
    sudo chown : /usr/local/bin/brew  #revert ownership
    

    The non-brew way:

    • Download mongodb distribution from 10gen: http://www.mongodb.org/downloads
    • Install files in /usr/local/bin/
    • Create a config file in /etc/mongo.conf (minimum, tell it where to store data, and probably tell it to bind only to localhost): http://www.mongodb.org/display/DOCS/File+Based+Configuration
    • Create a startup script that calls mongod -f /etc/mongo.conf

提交回复
热议问题