Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libcurl does not support HTTPS

I am running on Ubuntu 14.04 and I have manually installed curl 7.48 (see question Libcurl not updated).

I've tried to execute the command:

carlo@carlo-ThinkPad-W541:/usr/bin$ curl -sS https://storage.googleapis.com/kubernetes-release/release/stable.txt
curl: (1) Protocol "https" not supported or disabled in libcurl
carlo@carlo-ThinkPad-W541:/usr/bin$

So I've done a quick check on the configuration output and it clearly said SSL not supported:

configure: Configured to build curl/libcurl:

  curl version:     7.48.0
  Host setup:       x86_64-unknown-linux-gnu
  Install prefix:   /usr/local
  Compiler:         gcc
  SSL support:      no      (--with-{ssl,gnutls,nss,polarssl,mbedtls,cyassl,axtls,winssl,darwinssl} )

So I had a look at this link https://curl.haxx.se/docs/install.html And I've tried different commands:

root@carlo-ThinkPad-W541:~/curl-7.48.0# ./configure --with-ssl

trying to specify where is located my openSSL library:

root@carlo-ThinkPad-W541:~/curl-7.48.0# ./configure --with-ssl=/lib/x86_64-linux-gnu/

setting an env variables:

root@carlo-ThinkPad-W541:~/curl-7.48.0# export LDFLAGS="-L/lib/x86_64-linux-gnu/"
root@carlo-ThinkPad-W541:~/curl-7.48.0# ./configure --with-ssl

But nothing seems to work, the result is always the same:

[...]
configure: Configured to build curl/libcurl:

  curl version:     7.48.0
  Host setup:       x86_64-unknown-linux-gnu
  Install prefix:   /usr/local
  Compiler:         gcc
  SSL support:      no      (--with-{ssl,gnutls,nss,polarssl,mbedtls,cyassl,axtls,winssl,darwinssl} )
  SSH support:      no      (--with-libssh2)
  zlib support:     enabled
  GSS-API support:  no      (--with-gssapi)
  TLS-SRP support:  no      (--enable-tls-srp)
  resolver:         default (--enable-ares / --enable-threaded-resolver)
  IPv6 support:     enabled
  Unix sockets support: enabled
  IDN support:      no      (--with-{libidn,winidn})
  Build libcurl:    Shared=yes, Static=yes
  Built-in manual:  enabled
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors:   enabled (--disable-verbose)
  SSPI support:     no      (--enable-sspi)
  ca cert bundle:   /etc/ssl/certs/ca-certificates.crt
  ca cert path:     no
  ca fallback:      no
  LDAP support:     no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)
  LDAPS support:    no      (--enable-ldaps)
  RTSP support:     enabled
  RTMP support:     no      (--with-librtmp)
  metalink support: no      (--with-libmetalink)
  PSL support:      no      (libpsl not found)
  HTTP2 support:    disabled (--with-nghttp2)
  Protocols:        DICT FILE FTP GOPHER HTTP IMAP POP3 RTSP SMTP TELNET TFTP

root@carlo-ThinkPad-W541:~/curl-7.48.0# 
like image 354
carlomas Avatar asked Apr 28 '16 16:04

carlomas


Video Answer


1 Answers

The --with-ssl option to curl's configure will make it check for (and ideally use) OpenSSL.

You need to make sure that you have an OpenSSL devel package first so that the build process can use headers and find the relevant libraries etc.

If you have a custom build of OpenSSL somewhere on your system, you can point out the root of that custom OpenSSL install tree with ./configure --with-ssl=/path/to/prefix.

If that still doesn't properly find and use OpenSSL, you should consider opening up the file config.log that configure creates when run. Then search for openssl in there and try to analyze the checks for openssl in there and why they failed.

like image 197
Daniel Stenberg Avatar answered Oct 17 '22 10:10

Daniel Stenberg