curl does not support http2 on mac
Asked Answered
P

3

18

I've got the latest version of curl and still not seeing http2 show up as a feature. I've followed steps around related questions, but still out of luck.

$ /usr/local/Cellar/curl/7.43.0/bin/curl -V
curl 7.43.0 (x86_64-apple-darwin14.3.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: IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets

any ideas?

Paracasein answered 29/7, 2015 at 18:38 Comment(0)
R
30

brew info curl lists the required flags to enable that feature.

brew reinstall curl --with-openssl --with-nghttp2 will update your installation.

Rosemare answered 29/7, 2015 at 18:54 Comment(1)
@MarkFine : If it solves the problem, could you validate that answer with the green check?Diaconal
E
26

The Homebrew team recently removed all options for the curl formula, but the curl-openssl formula has HTTP/2 enabled.

brew install curl-openssl
Eade answered 31/1, 2019 at 18:25 Comment(0)
L
10

By default, curl is not compiled with nghttp2. As explained in this article, you need to recompile it passing the --with-nghttp2 flag and link it (to replace the original curl shipped with Mac OS X.

# install cURL with nghttp2 support
$  brew install curl --with-nghttp2

# link the formula to replace the system cURL
$  brew link curl --force

# now reload the shell
Larina answered 25/1, 2016 at 22:44 Comment(1)
Any issues overriding the system curl?Isolative

© 2022 - 2024 — McMap. All rights reserved.