Mac 下使用brew install 报错

1
2
3
4
5
$ sudo brew install opam
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.

用sudo执行brew命令,必须将 /usr/local/bin/brew 改成root

1
sudo chown root:wheel /usr/local/bin/brew

坚持原创技术分享,您的支持将鼓励我继续创作!