I'm using Terminal on Mac OS X 10.11.2 and I can't process any https requests. I always get this error:
curl: (1) Protocol "https" not supported or disabled in libcurl
I tried this but I get a "wrong directory" error:
./configure --with-ssl=/usr/local/ssl
Any advice would be helpful.
EDIT:
This is the error I get when trying to install with ssl:
configure: error: OpenSSL libs and/or directories were not found where specified!
SOLUTION:
For Mac OS X 10.6 or later use this to enable SSL:
./configure --with-darwinssl
The Homebrew team has recently removed all install options for the cURL formula, which means you will not be able to do brew install curl --with-openssl
now. Instead, do brew install curl-openssl
. Make sure to uninstall the old one with brew uninstall curl
first.
Following steps helped fix the issue: (Note: libcurl will be rebuilt though)
# First simply remove curl and try reinstall with openssl:
brew rm curl && brew install curl --with-openssl # Rerun
If doesn't fix, download and rebuild libcurl with following steps, which helped me fix the issue
# Download curl from : https://curl.haxx.se/download.html
wget https://curl.haxx.se/download/curl-7.58.0.zip # or, wget https://curl.haxx.se/download/curl-*.*.*
unzip curl-7.58.0.zip # or, unzip curl-*.*.*
./configure --with-darwinssl # However for Linux(ubuntu): ./configure --with-ssl
make
sudo make install # Rerun the program
SOLUTION:
For Mac OS X 10.6 or later use this to enable SSL:
./configure --with-darwinssl
Solved it by replacing standard curl with one with nghttp2 support (require brew)
brew install curl --with-nghttp2
brew link curl --force
include --http2
when doing request
example:
curl --http2 https://www.example.com
or:
curl --header 'Access-Token: o.bFbpTuazstlUZXsnyTWTaJq0biZ' \
--http2 https://www.example.com/
Ref: https://daniel.haxx.se/blog/2016/08/01/curl-and-h2-on-mac/ https://simonecarletti.com/blog/2016/01/http2-curl-macosx/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With