PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, May 14, 2022

[FIXED] How do i get cURL to use https

 May 14, 2022     curl, https, linux, ubuntu     No comments   

Issue

I'm on Ubuntu 14.04.2 LTS. cURL's installed but does not include HTTPS as a protocol that it will use.

For example:

curl https://npmjs.org/install.sh | sh

gives me this:

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

Checking curl -V results in:

Protocols: dict file ftp gopher http imap pop3 rtsp smtp telnet tftp
Features: IPv6 Largefile

HTTPS is missing from that list... so, how do I install cURL with support for HTTPS?

Oh, and sudo apt-get install curl is what I did to install it in the first place.


Solution

Your curl version wasn't compiled with SSL support. It's actually a flag that is passed during the config phase:

./configure --with-ssl

The quickest and most complete way is to download the curl sources and compile it yourself with the --with-ssl flag. This will also ensure that your curl and SSL libraries won't be vulnerable to any of the nasty, known vulnerabilities as well. There are workarounds for using insecure versions of SSL but of course that's not recommended.



Answered By - Max Worg
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © 2025 PHPFixing