只需将
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
这句命令拷贝到终端运行即可。
如果已经安装brew时候出现“chown: /usr/local: Operation not permitted错误”,则先把以下语句拷贝到终端卸载brew,然后重新安装
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"