Programing

curl : (1) 프로토콜 https가 libcurl에서 지원되지 않거나 비활성화되었습니다

lottogame 2020. 7. 19. 09:49
반응형

curl : (1) 프로토콜 https가 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

이 문제를 어떻게 해결할 수 있습니까?


창문에 대한 대답이 여기 에 있습니다.

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://"


루 비용 rvm을 설치하는 동안 동일한 문제가 발생했습니다. 해결책을 찾았습니다 : 루트의 다운로드 폴더에서 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)

출처


이미 많은 답변이있는 것처럼 보이지만 내가 직면 한 문제는 큰 따옴표였습니다. 다음과 같은 차이점이 있습니다.

"

첫 번째 큰 따옴표를 두 번째로 변경하면 나를 위해 일했습니다. 아래는 샘플 컬입니다.

curl -X PUT -u xxx:xxx -T test.txt "https://test.com/test/test.txt"

이것은 libcurl FAQ 항목 "libcurl에서 프로토콜 xxx가 지원되지 않거나 비활성화되어 있습니다 "에 구체적으로 언급되어 있습니다.

당신의 즐거움을 위해 여기에 설명도 포함시킵니다.

사용하기 위해 URL을 전달할 때 특정 프로토콜이 지원되지 않거나 비활성화되어 있다고 응답 할 수 있습니다. 이 오류 메시지가 표시되는 특정 방법은 curl이 특정 프로토콜이 지원되지 않는지 (즉, 해당 프로토콜을 말하는 방법을 알고있는 코드를 전혀 얻지 않았는지) 명시 적으로 비활성화되었는지 여부를 내부적으로 구분하지 않기 때문입니다. curl은 주어진 프로토콜 세트 만 지원하도록 빌드 될 수 있으며 나머지는 비활성화되거나 지원되지 않습니다.

이 오류는 "htpt : //example.com"과 같이 철자가 틀린 프로토콜 부분을 전달하거나 " http : // example 과 같이 공백으로 프로토콜 부분을 접두사로 표시하는 경우 덜 분명한 경우와 같이 발생합니다 . .com / ".


--with-darwinssl 플래그로이 문제를 해결했습니다.

curl 소스 코드가있는 폴더로 이동

여기에서 다운로드하십시오 https://curl.haxx.se/download.html

sudo ./configure --with-darwinssl
make
make install

콘솔을 다시 시작하면 완료됩니다!


필자의 경우 처음에는 libcurl에서 HTTPS 프로토콜을 지원하지 않았습니다. 지원되는 프로토콜과 지원되지 않는 프로토콜을 찾으려면 다음 명령을 사용하여 curl 버전을 확인하십시오.

curl --version

: 그것은 다음과 같은 정보를 제공하는 curl 7.50.3 (x86_64-apple-darwin15.6.0) libcurl/7.50.3 SecureTransport zlib/1.2.5프로토콜 : DICT 파일을 FTP FTPS 고퍼 HTTP IMAP IMAPS LDAP LDAPS POP3 POP3S RTSP SMB 중소기업 SMTP SMTPS 텔넷 TFTP 특징 : IPv6의 큰 파일로 NTLM NTLM_WB SSL을 UnixSockets libz

https 프로토콜이 지원되지 않는 곳.

그런 다음 curl을 다시 설치하고 포장을 풀고 다음 명령을 사용하여 설치했습니다.

./configure --with-darwinssl (Mac에서 SSL 통신 사용) make make test sudo make install

그리고 몇 분의 작업 끝에 문제가 해결되었습니다!

그런 다음 curl version 명령을 다시 실행하면 다음과 같이 표시됩니다.

curl 7.50.3 (x86_64-apple-darwin15.6.0) libcurl/7.50.3 SecureTransport zlib/1.2.5 프로토콜 : 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 프로토콜이 나타났습니다!

마지막으로 컬 문제가 발생했을 때 참조 할 수있는 유용한 사이트입니다. https://curl.haxx.se/docs/install.html


난 그냥 변경 'http://webname...'하여 해결"http://webname..."

인용문을 주목하십시오. "단일 ( ') 대신 이중 ( ) 이어야합니다 .


https 사이트에서 curl을 사용할 때와 같은 오류가 발생했습니다.

curl https://api.dis...

ganesh 에서 지적했듯이 내 curl 버전이 SSL을 활성화하지 않았기 때문입니다. 되돌아 가서 ssl로 버전을 다운로드했는데 정상적으로 작동했습니다.


UTF 기호가 표시되지 않아 문제가 발생했습니다. nginx 트랙 에서 링크를 복사 하고 클립 보드에 다음을 얻었습니다.

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.

참고URL : https://stackoverflow.com/questions/6884669/curl-1-protocol-https-not-supported-or-disabled-in-libcurl

반응형