10

As the title says, when I try to install packages via homebrew through my home network, I get the following error:

curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to akamai.bintray.com:443 
Error: Failed to download resource "rclone"
Download failed: https://homebrew.bintray.com/bottles/rclone-1.38.high_sierra.bottle.tar.gz

However, I can download from the .tar.gz URL that is specified just fine through my browser.

I know this is only a problem with my home network because when I tether my phone it works fine.

Probably got something to do with my router settings and/or ISP but I am not sure where to look.

Thanks for the help! :)

6
  • 1
    Did you ever figure this out? I'm seeing the same issue and it is also limited to my home network. Feb 4, 2018 at 3:14
  • 1
    Nope, I just use another network for this stuff :( Feb 5, 2018 at 4:22
  • 1
    I managed to fix it by adding --ciphers ECDHE-RSA-AES128-GCM-SHA256 to the curl request. Another solution is to download a newer version curl. Feb 25, 2018 at 23:27
  • 1
    Thanks man, how did you figure it out? Also can you tell me which curl version you installed to get it working, because I got the latest version and its still not working :( I'm on Mac OSX Mar 1, 2018 at 16:23
  • 1
    @AlexanderEkdahl do you why this happens by any chance? I am curious Mar 2, 2018 at 18:00

3 Answers 3

6

A thought occurs to me -- have you checked your router to see if it is doing a transparent proxy for you?

If it is, then you may want to turn that off.

If you can't turn it off, then you might want to install a VPN solution that will allow you to bypass it.

Just a thought.

1
  • Thanks. By the router acting as a transparent proxy, I guess it means all my requests are intercepted by the router? Is this a security risk even if my traffic is https encrypted? Sep 27, 2018 at 8:45
6

Since you're using LibreSSL, try re-installing curl with OpenSSL instead of Secure Transport.

The latest brew, it depends on OpenSSL by default, so you've to reinstall it:

brew reinstall curl

For older Brew, there was an option --with-openssl which was removed, e.g.

brew reinstall curl --with-openssl

Here are few other suggestions:

  • Run brew options curl to display install options specific to formula.
  • Compile from the source. Check curl.rb formula for more details.
  • Make sure you're not using http_proxy/https_proxy.
  • Use -v to curl for more verbose output.
  • Try using BSD curl at /usr/bin/curl, run which -a curl to list them all.
  • Make sure you haven't accidentally blocked curl in your firewall (such as Little Snitch).
  • Alternatively use wget.
6
  • brew reinstall curl --with-openssl get Error: invalid option: --with-openssl
    – Jeff Tian
    Mar 15, 2019 at 10:07
  • Check brew options curl to display install options specific to formula, as per manual.
    – kenorb
    Mar 15, 2019 at 13:21
  • Thanks for the reply. But my brew options curl gives empty result. What gives?
    – Jeff Tian
    Mar 18, 2019 at 2:24
  • It seems the option was removed, try reinstalling it without any option. I've updated the answer.
    – kenorb
    Mar 18, 2019 at 11:41
  • 1
    Try: brew uninstall curl. The one which comes from macOS, you can't uninstall it. You need to install new one in /usr/local and Brew should adjust $PATH, to point to the new one first.
    – kenorb
    Mar 19, 2019 at 14:07
6

For those who are still struggling to resolve this.

Please try:

brew update-reset
brew update # This might not be needed.

I found this gem here.

2
  • it work for me.
    – 任喜军
    Jul 15, 2021 at 9:17
  • me too, I tried a thousand of other solutions but only update-reset do the magic!
    – RikiRiocma
    Jun 26, 2022 at 8:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.