2016-04-28 229 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