1.-bash: brew: command not found
解决办法:
vi ~/.bash_profile
export PATH=/usr/local/bin:$PATH
source ~/.bash_profile
2.chown: /usr/local: Operation not permitted
先卸载已安装的homebrew,命令如下:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
然后重新安装:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"