投身烈火
Keep Walking

总结一下升级OS X El Capitan后brew遇到的问题

升级了osx之后,先是brew update的时候报错,后来用brew安装jenv的时候又提示说需要root权限

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Error: Failure while executing: /usr/bin/otool -L /usr/bin/install_name_tool

但是sudo brew install又报错

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.

搜了下貌似是新版osx的问题,需要进行权限设置,用chown命令设置一下就好了

以下是一些参考资料

How To Fix Cowardly Refusing to Sudo error in Brew – Mac OS X

Failed brew update on El Capitan (OS X 10.11) Beta

Mac OS X El Capitan にアップデートした後に brew update が動かない場合の対処方法