1.终端下安装 Homebrew
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install ant
3.如果遇到link
错误,如下
Error: The
brew link
step did not complete successfully
The formula built, but is not symlinked into/usr/local
Could not symlink .
/usr/local/opt
is not writable.You can try again using:
brew link ant
使用chown
命令解决权限问题后使用link命令链接ant
$ sudo chown -R "$USER":admin /usr/local
$ brew link ant