sudo brew install mongodb报错

报错信息如下:

Error: Running Homebrew as root is extremely dangerous and no longer supported. As Homebrew does not drop privileges on installation you would be giving all build scripts full access to your system.
解决方法:

命令:sudo chown -R 用户名 /usr/local

再次报错:chown: /usr/local: Operation not permitted

在High Sierra版本中已经不能这么使用了,应该这么使用:

sudo chown -R $(whoami) $(brew --prefix)/*

brew install mongodb

 

posted @ 2019-03-05 22:02  叶子玉  阅读(360)  评论(0编辑  收藏  举报