【macOS】brew update报错:fatal: unable to access xxx & LibreSSL SSL_connect 解决方案
✨报错提示
fatal: unable to access 'https://mirrors.ustc.edu.cn/homebrew-cask.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to mirrors.ustc.edu.cn:443
fatal: unable to access 'https://mirrors.ustc.edu.cn/brew.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to mirrors.ustc.edu.cn:443
fatal: unable to access 'https://mirrors.ustc.edu.cn/homebrew-core.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to mirrors.ustc.edu.cn:443
fatal: unable to access 'https://mirrors.ustc.edu.cn/homebrew-cask-versions.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to mirrors.ustc.edu.cn:443
Error: Fetching /opt/homebrew/Library/Taps/homebrew/homebrew-cask failed!
Fetching /opt/homebrew failed!
Fetching /opt/homebrew/Library/Taps/homebrew/homebrew-core failed!
Fetching /opt/homebrew/Library/Taps/homebrew/homebrew-cask-versions failed!
出现该报错原因较多
请逐一排查
本解决方案仅针对配置了Git代理的情况
不嫌麻烦可以尝试重新安装brew以及所有formula和cask
✨解决方案
如果明确是配置Git代理导致出现此报错
可以考虑取消Git代理
# http & https
git config --global http.proxy 127.0.0.1:7890
git config --global https.proxy 127.0.0.1:7890
# socks5
git config --global http.proxy socks5://127.0.0.1:7890
git config --global https.proxy socks5://127.0.0.1:7890
# 取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy
或者可以更换代理软件为ClashX Pro
在ClashX GitHub README中描述如下
Download ClashX Pro With enhanced mode and Native Apple Silicon support at AppCenter for free permanently.
和ClashX使用基本一致但是功能更为强大
安装后打开增强模式即可在配置了Git代理的情况下正常运行brew update
而不出现以上报错
⭐转载请注明出处
本文作者:双份浓缩馥芮白
原文链接:https://www.cnblogs.com/Flat-White/p/17413624.html
版权所有,如需转载请注明出处。