你可能尝试了很多办法去安装brew,从一开始的网络超时,到一脸蒙的手动安装,本文教你如何正确安装brew
创建Homebrew目录
打开你的终端执行下面的命令,进行创建Homebrew
sudo mkdir /usr/local/Homebrew
同步brew.git库
sudo git clone https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git /usr/local/Homebrew
标题添加环境变量
sudo ln -s /usr/local/Homebrew/bin/brew /usr/local/bin/brew
同步core库
sudo mkdir -p /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
sudo git clone https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
同步cask
sudo mkdir -p /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask
sudo git clone https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git /usr/local/Ho