欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Mac 下使用brew install 报错: Error: Cowardly refusing to `sudo brew install'

程序员文章站 2022-07-14 15:32:55
...

Mac 下使用brew install 报错:

localhost:infer-osx-v0.6.0 admin$ sudo brew install opamError: 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 atyour own risk.

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

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