最近在新Mac下面安装node,没想到遇到这个问题,Mac版本是10.12。
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 $(whoami) /usr/local
,依然是同样报错,我查看了brew的版本,和我之前的Mac不太一样。
如下
提示你不要在root权限下使用brew,那你就不要加sudo了