Reputation: 11110
Since I updated to the latest version of macOS 10.15.4 Catalina, when I do brew update
I'm getting this error:
fatal: unable to access 'https://github.com/Homebrew/homebrew-cask/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
I used to be fine before the update (already had Catalina). Not sure what changed.
I did search around and found several topics (also older ones) regarding this problem, both here and on github. Unfortunately none of the suggestions worked for me:
export HOMEBREW_FORCE_BREWED_CURL=1
and then brew update
echo '--no-alpn' > ~/.curlrc
; export HOMEBREW_CURLRC=1
; brew update
All to no avail, the error keeps coming up.
It doesn't mention anything curl related however from other topics on this problem I understand it's most likely related to curl. I haven't changed anything curl related myself (although maybe the latest Catalina patch did, not sure). It did work fine until a few days ago.
I also found some other suggestions that looked rather unlikely, and moreover they seemed to change some basic OS installations which I would really prefer to avoid (afraid it will lead to other incompatibilities).
Is there an easy, safe way to fix this?
FYI I'm using Homebrew 2.2.15.
Upvotes: 8
Views: 10897
Reputation: 727
For me, living in China, it may be a network problem. If you has a shadowsocks, try this to add a proxy:
$ tee ~/.gitconfig <<HERE
heredoc> [http]
sslBackend = openssl
proxy = socks5://127.0.0.1:1080
heredoc> HERE
Remember change ip and port.
Upvotes: 0
Reputation: 11
I had the same problem. I just quit VPN and the problem solved.
Upvotes: 0
Reputation: 1548
Disable proxy (am not using one)
and
started to look at my router.
Helped me figure that same problem out. Out-dated adlist on the Pi-hole was the api.github.com
-blocking culprit in my case.
Upvotes: 0
Reputation: 31
I was having the same issue on my 2015 MBP after upgrading to Catalina. My work computer is a 2019 MBP, but was not encountering the same problem. Both laptops with the same version of macOS and homebrew version. The difference was that I had a lot more installed and several extra taps on my 2015 MBP.
I found and tried the same suggestions that you've tried. I even took it one step further, thinking that if I could start fresh I could solve this issue once and for all. I decided to try a fresh homebrew installation rather then the nuclear option of slicking the MBP. So I backed up the my installed list brew list > brew.list
and brew cask list > cask.list
and ran the uninstall [https://github.com/homebrew/install#uninstall-homebrew]. After reinstalling homebrew I was still encountering the same problem.
I noticed that the issue was sporadic. If I ran brew update
multiple times, with this command seq 100 | xargs -I -- brew update
, sometimes it would succeed without the LibreSSL error. I started to look at my router. I have a Asus Wifi router with the latest firmware. I suspected that it was QOS, filter, or something TrendMicro router integration is doing.
The problem ended up being my dual wan setup. Once I forced the 2015 MBP to route through a single wan port the issue went away. The reason my work 2019 MBP wasn't encounter this issue was because I tended to be always connected to the work VPN most of the time.
I have not determined why enabling load balancing across dual wan would cause this issue since the http connection should be made and then disconnected once per request. I suspect that something is reused and not disposed of properly thus causing the SSL error.
If you don't have a dual wan setup, look in your Network settings to see if you're connected to more than one network.
Upvotes: 3