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?
Got the answer HERE for windows, it says there that:
curl -XPUT 'http://localhost:9200/api/twittervnext/tweet'
Woops, first try and already an error:
curl: (1) Protocol 'http not supported or disabled in libcurl
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:
curl –XPUT "http://localhost:9200/api/twittervnext/tweet"
I ran into this problem and turned out that there was a space before the https
which was causing the problem. " https://"
vs "https://"
I encountered the same problem while trying to install rvm for ruby. found the solution: after extracting curl (tar) in downloads folder of root.
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)
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:
When passing on a URL to curl to use, it may respond that the particular protocol is not supported or disabled. The particular way this error message is phrased is because curl doesn't make a distinction internally of whether a particular protocol is not supported (ie never got any code added that knows how to speak that protocol) or if it was explicitly disabled. curl can be built to only support a given set of protocols, and the rest would then be disabled or not supported.
Note that this error will also occur if you pass a wrongly spelled protocol part as in "htpt://example.com" or as in the less evident case if you prefix the protocol part with a space as in " http://example.com/".
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:
curl -X PUT -u xxx:xxx -T test.txt "https://test.com/test/test.txt"
Solved this problem with flag --with-darwinssl
Go to folder with curl source code
Download it here https://curl.haxx.se/download.html
sudo ./configure --with-darwinssl
make
make install
restart your console and it is done!
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:
curl --version
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):
./configure --with-darwinssl (enable ssl communication in mac) make make test sudo make install
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
I solve it just by changing 'http://webname...'
to "http://webname..."
Notice the quote. It should be double ("
) instead of single ('
).
Got the same error when using curl on https site like
curl https://api.dis...
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.
My problem was coused by not displayed UTF symbol. I copy link from nginx track and got the next in clipboard:
0x00000000: e2 80 8b 68 74 74 70 73 3a 2f 2f 73 6b 2e 65 65 2f 75 70 6c 6f 61 64 2f 66 69 6c 65 73 2f 45 53 ...https://sk.ee/upload/files/ES
0x00000020: 54 45 49 44 2d 53 4b 5f 32 30 31 35 2e 70 65 6d 2e 63 72 74 TEID-SK_2015.pem.crt
Problem symbol is 0xe2 0x80 0x8b
ZERO WIDTH JOINER, which is precedes https.
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
or libssl.so
, so I assume this must mean that even though the make
and make install
succeeded without errors, nevertheless curl does not have HTTPS support? Configure and make was as follows:
./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
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.
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:
Protocol "http" not supported or disabled in libcurl, took 0 seconds.
来源:https://stackoverflow.com/questions/6884669/curl-1-protocol-https-not-supported-or-disabled-in-libcurl