OS X 10.11.6 El Capitan SSLRead() return error -9841

15,819

Had this same issue with Sierra and it seemed to be that even after running brew install --with-openssl curl, it still wan't being picked up by the path.

To begin, I had to force install the package with brew install --force --with-openssl curl

I then had to force link the new version of curl with brew link --force curl

After closing and reopening my terminal, it worked (this might have been what made the restart work with the above answer).

Share:
15,819
Dmitry Petukhov
Author by

Dmitry Petukhov

Updated on June 04, 2022

Comments

  • Dmitry Petukhov
    Dmitry Petukhov almost 2 years

    After curl request in terminal to https website i had this error

    curl: (56) SSLRead() return error -9841
    

    curl --version

    curl 7.43.0 (x86_64-apple-darwin15.0) libcurl/7.43.0 SecureTransport zlib/1.2.5
    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
    Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets
    

    How to make curl work?

    P.S I reinstalled curl by this command brew install --with-openssl curl

  • mykeels
    mykeels over 6 years
    This fixed it for me ... if you already had curl installed outside of brew, ensure that the path brew installs curl to is returned by the which curl command