执行命令:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"安装至最后时报错:
解决方案:
1.更换有效的镜像地址;
git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=12.前往至 homebrew-core 将其当前的镜像地址也更为有效的地址;
cd "$(brew --repo)" git remote set-url origin https://mirrors.ustc.edu.cn/brew.git cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git3.重新执行更新
brew update4.执行完如上操作后,终端显示如下字样内容即可
Already up-to-date.
----------------------------
推荐使用阿里镜像站 https://developer.aliyun.com/mirror/homebrew