curl :(1) libcurl 中不支持或禁用协议 https
我正在尝试在 Ubuntu 11.04 上安装 Rails 环境。当我启动命令 rvm install 1.9.2 --with-openssl-dir=/usr/local
时,收到以下错误:
curl : (1) Protocol https not supported or disabled in libcurl
如何解决此问题?
I'm trying to install the Rails environments on Ubuntu 11.04. When I launch the command rvm install 1.9.2 --with-openssl-dir=/usr/local
the following error is received:
curl : (1) Protocol https not supported or disabled in libcurl
How can this be resolved?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(13)
此处得到了答案视窗,
它在那里说:
哎呀,第一次尝试,已经出现错误:
这个错误的原因有点愚蠢,Windows 不喜欢你在命令中使用单引号。所以正确的命令是:
Got the answer HERE for windows,
it says there that:
Woops, first try and already an error:
The reason for this error is kind of stupid, Windows doesn’t like it when you are using single quotes for commands. So the correct command is:
我遇到了这个问题,结果发现 https 之前有一个空格导致了问题。
" https://"
与"https://"
I ran into this problem and turned out that there was a space before the
https
which was causing the problem." https://"
vs"https://"
看起来已经有很多答案了,但我面临的问题是双引号。
两者之间存在差异:
将
第一个双引号更改为第二个双引号对我有用,下面是示例卷曲:
Looks like there are so many Answers already but the issue I faced was with double quotes.
There is a difference in between:
and
Changing the 1 st double quote to the second worked for me, below is the sample curl:
我在尝试为 ruby 安装 rvm 时遇到了同样的问题。
找到了解决方案:
将curl (tar) 解压到根下载文件夹中后。
来源
I encountered the same problem while trying to install rvm for ruby.
found the solution:
after extracting curl (tar) in downloads folder of root.
source
就我而言,libcurl 一开始就不支持 HTTPS 协议。为了找出支持哪些协议,哪些不支持,我使用命令检查了curl版本:
它提供的信息如下:
curl 7.50.3 (x86_64-apple-darwin15.6.0) libcurl/7.50.3 SecureTransport zlib/1.2.5
协议: dict file ftp ftps gopher http imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
功能: IPv6 大文件 NTLM NTLM_WB SSL libz UnixSockets
,其中不支持 https 协议。
然后我重新安装了curl并使用以下命令安装了它(解压后):
经过几分钟的工作,问题解决了!
然后我重新运行curl版本命令,它显示:
curl 7.50.3 (x86_64-apple-darwin15.6.0) libcurl/7.50.3 SecureTransport zlib/1.2.5
协议: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
特点: IPv6 大文件 NTLM NTLM_WB SSL libz UnixSockets
HTTPS 协议出现!
最后,当您遇到卷曲问题时,可以参考一个有用的网站。
https://curl.haxx.se/docs/install.html
In my case, HTTPS protocol was not supported by libcurl at the first place. To find out which protocols are supported and which are not, I checked the curl version using command:
It provided information as follows:
curl 7.50.3 (x86_64-apple-darwin15.6.0) libcurl/7.50.3 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets
where https protocol happens to be not supported.
Then I re-installed curl and installed it using the following commands(after unpacked):
And after several minutes of work, Problems resolved!
Then I re-run the curl version command, it showed:
curl 7.50.3 (x86_64-apple-darwin15.6.0) libcurl/7.50.3 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets
HTTPS protocol showed up!
Finally, a useful site to refer when you run into curl problems.
https://curl.haxx.se/docs/install.html
我只需将
'http://webname...'
更改为"http://webname..."
注意引号即可解决此问题。 它应该是双精度 (
"
),而不是单精度 ('
)。I solve it just by changing
'http://webname...'
to"http://webname..."
Notice the quote. It should be double (
"
) instead of single ('
).使用标志 --with-darwinssl 解决了这个问题
转到包含curl源代码的文件夹
在此处下载 https:// curl.haxx.se/download.html
重新启动控制台即可完成!
Solved this problem with flag --with-darwinssl
Go to folder with curl source code
Download it here https://curl.haxx.se/download.html
restart your console and it is done!
libcurl 常见问题解答条目“libcurl 中不支持或禁用协议 xxx”。
为了让您高兴,我也将解释嵌入此处:
This is specifically mentioned in the libcurl FAQ entry "Protocol xxx not supported or disabled in libcurl".
For your pleasure I'm embedding the explanation here too:
我的问题是由于未显示 UTF 符号引起的。我从浏览器复制链接(在我的例子中,它是 nginx 轨道)并且剪贴板中出现以下内容:
问题出在序列
0xe2 0x80 0x8b
中,该序列位于https
之前。此序列是 零宽度连接器,编码为 UTF-8。My problem was coused by not displayed UTF symbol. I copy the link from the browser (in my case it was an nginx track) and got the following in clipboard:
The problem is in the sequence
0xe2 0x80 0x8b
, which precedeshttps
. This sequence is a ZERO WIDTH JOINER encoded in UTF-8.在 https 网站上使用curl时出现相同的错误,如
ganesh 所指出的,这是因为我的curl版本不是'启用 SSL。返回并下载带有 ssl 的版本,效果很好。
Got the same error when using curl on https site like
as pointed out by ganesh, it was because my version of curl wasn't ssl enabled. went back and downloaded the version with ssl and it worked fine.
我刚刚重新编译了curl,配置选项指向openssl 1.0.2g 库文件夹和include 文件夹,但我仍然收到此消息。当我在curl上执行ldd时,它没有显示它使用
libcrypt.so
或libssl.so
,所以我认为这一定意味着即使make
和make install
成功且没有错误,但是curl不支持HTTPS?配置和制作如下:我应该提到
libssl.so.1
位于/local/scratch/PACKAGES/local/lib
中。目前尚不清楚--with-ssl
选项是否应指向此处或 openssl 安装放置 openssl.cnf 文件的目录。我选择了后者。但如果应该是前者,那么 make 应该会失败,并出现找不到库的错误。I just recompiled curl with configure options pointing to the openssl 1.0.2g library folder and include folder, and I still get this message. When I do ldd on curl, it does not show that it uses either
libcrypt.so
orlibssl.so
, so I assume this must mean that even though themake
andmake install
succeeded without errors, nevertheless curl does not have HTTPS support? Configure and make was as follows:I should mention that
libssl.so.1
is in/local/scratch/PACKAGES/local/lib
. It is unclear whether the--with-ssl
option should point there or to the directory where the openssl install placed the openssl.cnf file. I chose the latter. But if it were supposed to be the former, the make should have failed with an error that it couldn't find the library.在 url 中指定协议可能会解决您的问题。
我遇到了类似的问题(在使用curl php客户端时):
我传递的是domain.com而不是sftp://domain.com,这导致了这个令人困惑的错误:
Specifying the protocol within the url might solve your problem.
I had a similar problem (while using curl php client) :
I was passing domain.com instead of sftp://domain.com which lead to this confusing error:
要构建 CURL,您首先需要 ssl 库,因此 curl 二进制文件 可以在嵌入 SSL 的情况下运行
好的,让我们开始吧:
to build CURL, you need ssl library first, so the curl binary can run with SSL embedded
Ok, let's go: