我正在尝试在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
如何解决这个问题?
当前回答
我在为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)
源
其他回答
我的问题是由于没有显示UTF符号。我从浏览器中复制链接(在我的情况下,这是一个nginx轨道),并在剪贴板中得到以下内容:
$ echo -n "https://sk.ee/upload/files/ESTEID-SK_2015.pem.crt" | hexdump -C
00000000 e2 80 8b 68 74 74 70 73 3a 2f 2f 73 6b 2e 65 65 |...https://sk.ee|
00000010 2f 75 70 6c 6f 61 64 2f 66 69 6c 65 73 2f 45 53 |/upload/files/ES|
00000020 54 45 49 44 2d 53 4b 5f 32 30 31 35 2e 70 65 6d |TEID-SK_2015.pem|
00000030 2e 63 72 74 |.crt|
问题出现在https之前的0xe2 0x80 0x8b序列中。这个序列是一个用UTF-8编码的零宽度JOINER。
在url中指定协议可能会解决您的问题。
我有一个类似的问题(当使用curl php客户端):
我传递的是domain.com而不是sftp://domain.com,这导致了这个令人困惑的错误:
libcurl中不支持或禁用协议“http”,花费了0秒。
看起来已经有这么多答案了,但我面临的问题是双引号。 这两者之间有区别:
“
and
"
将第一个双引号改为第二个对我有用,下面是示例curl:
curl -X PUT -u xxx:xxx -T test.txt "https://test.com/test/test.txt"
用flag -with-darwinssl解决了这个问题
转到带有curl源代码的文件夹
请在这里下载https://curl.haxx.se/download.html
sudo ./configure --with-darwinssl
make
make install
重新启动控制台就完成了!
这里有窗户的答案, 上面说:
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"