2016-04-28 226 views
3

我在Ubuntu 14.04上运行,我手动安装了curl 7.48(请参阅问题Libcurl not updated)。libcurl不支持HTTPS

我一直在努力,执行命令:

 
[email protected]:/usr/bin$ curl -sS https://storage.googleapis.com/kubernetes-release/release/stable.txt 
curl: (1) Protocol "https" not supported or disabled in libcurl 
[email protected]:/usr/bin$ 

所以我已经做了配置输出进行快速检查,并明确表示不支持SSL:

 
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}) 

所以我不得不看看这个链接https://curl.haxx.se/docs/install.html 我试过不同的命令:

 
[email protected]:~/curl-7.48.0# ./configure --with-ssl 

试图指定位于我的OpenSSL库:

 
[email protected]:~/curl-7.48.0# ./configure --with-ssl=/lib/x86_64-linux-gnu/ 

设置的ENV变量:

 
[email protected]:~/curl-7.48.0# export LDFLAGS="-L/lib/x86_64-linux-gnu/" 
[email protected]:~/curl-7.48.0# ./configure --with-ssl 

但似乎没有任何工作,结果总是一样的:

 
[...] 
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 

[email protected]:~/curl-7.48.0# 
+0

也许[这](https://stackoverflow.com/questions/10079707/https-connection-using-curl-from-command-line)帮助 –

回答

2

卷曲配置的--with-ssl选项将使其检查(并理想地使用)OpenSSL。

你需要确保你有一个OpenSSL的devel包首先使构建过程可以使用页眉和找到相关的库等

如果你的OpenSSL自定义生成系统的某个位置,你可以用./configure --with-ssl=/path/to/prefix指出该定制OpenSSL安装树的

如果仍然无法正确找到并使用OpenSSL,则应考虑打开运行时配置创建的文件config.log。然后在那里搜索openssl并尝试分析那里的openssl检查以及为什么失败。

+0

感谢丹尼尔, 安装的libssl-dev的解决了这一问题。 – carlomas

+0

我不能满足,但我可以接受它 – carlomas