mac系统安装brew 以及安装ant遇到问题/usr/local is not writable 解决方法

brew安装命令如下:

curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1

ant安装
sudo brew install ant
碰到可能碰到类似问题:

MacBook-Air:appium tenda$ sudo brew install ant

Error: 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):admin /usr/local

原文地址:https://www.cnblogs.com/nemolmt/p/6292909.html