我正在尝试在Ubuntu 11.04上安装Rails环境。当我启动命令rvm install 1.9.2——with-openssl-dir=/usr/local时,收到以下错误:
curl : (1) Protocol https not supported or disabled in libcurl
如何解决这个问题?
我正在尝试在Ubuntu 11.04上安装Rails环境。当我启动命令rvm install 1.9.2——with-openssl-dir=/usr/local时,收到以下错误:
curl : (1) Protocol https not supported or disabled in libcurl
如何解决这个问题?
当前回答
我只需要修改“http://webname…”变成“http://webname……”
注意这句话。它应该是double(")而不是single(')。
其他回答
这里有窗户的答案, 上面说:
curl -XPUT 'http://localhost:9200/api/twittervnext/tweet'
哎呀,第一次尝试就已经出错了:
curl: (1) Protocol 'http not supported or disabled in libcurl
这个错误的原因有点愚蠢,Windows不喜欢你在命令中使用单引号。所以正确的命令是:
curl –XPUT "http://localhost:9200/api/twittervnext/tweet"
我遇到了这个问题,原来在https之前有一个空格,导致了这个问题。“Https://”vs“Https://”
我在为ruby安装rvm时遇到了同样的问题。 找到解决方案: 在root的下载文件夹中提取curl (tar)后。
cd /root/Downloads/curl # step-1
./configure --with-ssl # step-2
make # step-3
make install # step-4 (if not root, use sudo before command)
源
在我的例子中,libcurl首先不支持HTTPS协议。为了找出哪些协议被支持,哪些协议不被支持,我使用命令检查了curl版本:
curl --version
它提供的资料如下: libcurl/7.50.3 SecureTransport zlib/1.2.5 . zip (x86_64-苹果-达尔文15.6.0 协议类型:dict文件ftp ftps gopher http imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 特性:IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets
恰好不支持HTTPS协议。
然后我重新安装curl,并使用以下命令安装它(在解包后):
./configure——with-darwinssl(在mac中启用SSL通信) 使 做测试 Sudo make install
经过几分钟的工作,问题解决了!
然后我重新运行curl version命令,它显示:
libcurl/7.50.3 SecureTransport zlib/1.2.5 . zip (x86_64-苹果-达尔文15.6.0 协议类型:dict文件ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 特性:IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets
HTTPS协议出现了!
最后,当您遇到curl问题时,可以参考一个有用的站点。 https://curl.haxx.se/docs/install.html
我刚刚用指向openssl 1.0.2g库文件夹和包含文件夹的配置选项重新编译了curl,我仍然得到了这条消息。当我对curl执行ldd时,它没有显示它使用libcrypt。或者libssl。所以,所以我假设这一定意味着即使make和make安装成功没有错误,但curl不支持HTTPS ?配置和make如下:
./configure --prefix=/local/scratch/PACKAGES/local --with-ssl=/local/scratch/PACKAGES/local/openssl/openssl-1.0.2g --includedir=/local/scratch/PACKAGES/local/include/openssl/openssl-1.0.2g
make
make test
make install
我应该提到libssl.so。1在/local/scratch/PACKAGES/local/lib目录下。不清楚——with-ssl选项应该指向那里还是指向openssl安装放置openssl.cnf文件的目录。我选择了后者。但是如果它应该是前者,make应该会失败,并出现无法找到库的错误。