mac安装brew系统报错

问题

mac安装brew系统报错

报错信息

image

环境

你开着代理了吗?如果开着代理,需要设置一下代理,如果没有开代理,你尝试一下切换一下下载的源,切换到清华源试试,切换的命令:

git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

最后用其他办法安装成功了
清华源:

export homebrew_BREW_GIT_REMOTE=https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

export HOMEBREW_CORE_GIT_REMOTE=https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git

export HOMEBREW_BOTTLE_DOMAIN=Index of /homebrew-bottles/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

/bin/bash -c “$(curl -fsSL https://raw.staticdn.net/Homebrew/install/HEAD/install.sh)”

谢谢老师