通过mac自带的ruby安装brew, 命令:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
注意事项 1:
- 需通过代理访问,否则出现报错:
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
- 解决: 通过设置终端代理,端口根据设置自定义修改(clashx用户可以在功能菜单中直接复制),命令:
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
注意事项 2:
- 关闭IPV6,否则出现报错:
fatal: unable to access 'https://github.com/Homebrew/brew/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
Failed during: git fetch origin --tags --force
- 解决: 命令行设置关闭IPV6,命令:
networksetup -setv6off Wi-Fi