我如何获得cURL以使用https [英] How do i get cURL to use https

查看:93
本文介绍了我如何获得cURL以使用https的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Ubuntu 14.04.2 LTS。 cURL已安装,但不包括HTTPS作为它将使用的协议。

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

例如:

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

给我这个:

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

检查curl -V结果为:

Checking curl -V results in:

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

该列表中缺少HTTPS ...因此,如何安装支持以下内容的cURL是HTTPS吗?

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

哦,而 sudo apt-get install curl 是我首先安装它的方法。

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

推荐答案

您的curl版本未使用SSL支持进行编译。实际上,它是在配置阶段传递的一个标志:

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

./ configure --with-ssl

最快,最完整的方法是下载卷曲源自己编译,并带有-ssl 标志。这也将确保您的curl和SSL库也不会受到任何已知的令人讨厌的漏洞的攻击。有使用不安全版本的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.

这篇关于我如何获得cURL以使用https的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆