15

When I try curl http://google.com it works however when I do it with https, it gives this error:

curl: (1) Protocol "https" not supported or disabled in libcurl

I've searched for various answers but none explains how to fix it?

6
  • 2
    Can you add the following command and results to your question: curl --version | grep Protocols .... Helpful as well if you could give the exact curl command that is failing?
    – andrew.46
    Sep 7, 2016 at 6:49
  • 2
    The output of which curl and apt-cache policy curl would provide some helpful insight too. Sep 7, 2016 at 9:23
  • 1
    Are you using Ubuntu?
    – Anwar
    Sep 8, 2016 at 13:48
  • Did you set proxy? Try to unset http_proxy or https_proxy if it was set.
    – 32cupo
    Feb 19, 2020 at 11:42

2 Answers 2

11

Please install curl with SSL

Download:

Installing with SSL:

  • Unzip -> open terminal inside the directory PATH and type:

    ./configure --with-ssl
    make
    sudo make install
    

You can also specify the path to SSL installation, see ./configure --help for details

4
  • i have curl already bro, its not working with ssl only,
    – nabtron
    Sep 5, 2016 at 15:54
  • 1
    @nabtron: Benny suggests you download, compile and install curl with SSL support. Sep 7, 2016 at 9:22
  • 5
    You need libssl-dev installed if you want SSL support. sudo apt install libssl-dev
    – Ali Yousuf
    Aug 9, 2017 at 7:44
  • thank you! That was the missing link.
    – sjatkins
    Aug 22, 2021 at 7:36
5

A quick google found this curl FAQ on troubleshooting this problem.

But I actually would suggest to delete your current manual install of curl, and just install it with sudo apt-get install curl. The default Ubuntu install has the right libraries for https (and many more).

1
  • I did it as curl <site> --insecure
    – maan81
    Feb 26, 2019 at 16:44

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