mac下使用brew
安装软件的时候出现如下的错误:
Error: Cowardly refusing to `sudo brew install`
You can use brew with sudo, but only if the brew executable is owned by root.However, this is both not recommended and completely unsupported so do so at your own risk.
这个主要是因为brew
的权限不够,只需要更改brew命令的权限就可以
chown root:wheel /usr/local/bin/brew
PS:其中root:staff
为用户名和群组,这个根据具体情况确定。