1. 使用命令行 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2. 出现输出以下内容,安装失败:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
/usr/local/homebrew/.git: Permission denied
Failed during: git init -q
3.在命令行中输入 sudo chown -R $(whoami) /usr/local
4.再次输入 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 即可