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

前端 未结 3 955
天涯浪人
天涯浪人 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:42

    I keep hitting this same problem over and over with different brew packages (today it was ImageMagick), so I keep coming back to this page. I'm just going to leave my version of the above instructions for myself, and maybe someone else will find it handy too

    ls -al `which brew` # note user/group
    sudo chown root:wheel `which brew`
    sudo brew install 
    sudo chown : `which brew` # revert ownership
    

    using which brew in back ticks substitutes your path to brew.

    (and how do I escape backticks?)

提交回复
热议问题