mac安装homebrew报错 curl: (7) Failed to connect to raw.githubusercontent.com port443

335 阅读1分钟

mac安装brew一直报错,完整的报错信息如下:

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

晚上查找各种办法均没有作用,443 端口连接被拒一般是因为墙的原因,如果你可以科学上网的话,在命令行键以下命令执行

export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:789

如上安装成功以后,继续报warning:

# Warning: /opt/homebrew/bin is not in your PATH

把homebrew添加到全局即可

echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> $HOME/.zprofile