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?

5
  • 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 '16 at 6:49
  • 2
    The output of which curl and apt-cache policy curl would provide some helpful insight too. – David Foerster Sep 7 '16 at 9:23
  • 1
    Are you using Ubuntu? – Anwar Sep 8 '16 at 13:48
  • Did you set proxy? Try to unset http_proxy or https_proxy if it was set. – 32cupo Feb 19 '20 at 11:42
10

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

3
  • i have curl already bro, its not working with ssl only, – nabtron Sep 5 '16 at 15:54
  • 1
    @nabtron: Benny suggests you download, compile and install curl with SSL support. – David Foerster Sep 7 '16 at 9:22
  • 3
    You need libssl-dev installed if you want SSL support. sudo apt install libssl-dev – Ali Yousuf Aug 9 '17 at 7:44
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 '19 at 16:44

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