在更新或者安裝brew報(bào)root權(quán)限的錯(cuò)誤
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
把/use/local的owner換成自己杀赢,就有write權(quán)限了
whoami就是一個(gè)命令虫腋,會(huì)echo當(dāng)前登錄用戶的名字竭业。比如erica,就直接
sudo chown -R erica /usr/local
然后在執(zhí)行
brew install 或者 brew update 就可以了