Protocol "https" not supported or disabled in libcurl
Asked Answered
I

3

16

Here's my Podfile content:

platform :ios, ‘8.0’
use_frameworks!

target 'Project-Name' do

pod 'Firebase/Core'
pod 'Firebase/Messaging'

end

Same error occurs while adding pod 'GoogleMaps' into Podfile.

Error while running pod install --verbose command on Terminal:

[!] Error installing Firebase
[!] /usr/local/bin/curl -f -L -o /var/folders/1t/102_4r0x1_3_5dlq8zdbm27r0000gn/T/d20160902-4388-1omozrn/file.tgz https://www.gstatic.com/cpdc/cc5f7aac07ccdd0a/Firebase-3.5.0.tar.gz --create-dirs --netrc-optional

curl: (1) Protocol "https" not supported or disabled in libcurl

Edit 1: How do I enable curl SSL on Mac OS X?

./configure --with-darwinssl not working.

-bash: ./configure: No such file or directory


Edit 2: How do I enable https support in libcurl?

This command brew install curl --with-libssh2 is executed on terminal, but don't know what to do next:

UB:lib aspl$ brew install curl --with-libssh2 --verbose
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.

Warning: curl-7.50.1 already installed
UB:lib aspl$ curl --version
curl 7.48.0 (x86_64-apple-darwin14.5.0) libcurl/7.48.0 zlib/1.2.5
Protocols: dict file ftp gopher http imap ldap ldaps pop3 rtsp smtp telnet tftp 
Features: IPv6 Largefile libz UnixSockets 

This command not working:

$ otool -L /usr/local/git/libexec/git-core/git-http-push | grep curl
/usr/lib/libcurl.4.dylib

/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: '/usr/local/bin/git/libexec/git-core/git-http-push': Not a directory. fatal error: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: internal objdump command failed Binary file /usr/lib/libcurl.4.dylib matches


Edit:3 Terminal command which git shows /usr/local/bin/git


Edit:4 Enabling HTTPS Support in Curl Installed Through MacPorts on OSX

Running either sudo port install curl +ssl or sudo port uninstall curl says:

sudo: port: command not found

And to install ports(MacPorts) following link is used, which again is an HTTPS link:

$ curl -O https://distfiles.macports.org/MacPorts/MacPorts-2.3.4.tar.bz2

There also a download option of MacPort folder?

But what to do with that downloadedMacPorts-2.3.4 folder?

EDIT 5: Force uninstall curl and installing again didn't work :(

$ brew uninstall curl
Uninstalling /usr/local/Cellar/curl/7.50.1... (366 files, 2.6M)
curl 7.46.0 is still installed.
Remove them all with `brew uninstall --force curl`.
$ brew uninstall --force curl
Uninstalling curl... (360 files, 2.6M)
$ brew install curl --with-libssh2 --verbose
Error: curl 7.50.2 did not build
Logs:
     /Users/aspl/Library/Logs/Homebrew/curl/01.configure
     /Users/aspl/Library/Logs/Homebrew/curl/01.configure.cc
     /Users/aspl/Library/Logs/Homebrew/curl/02.make
     /Users/aspl/Library/Logs/Homebrew/curl/config.log

These open issues may also help:
curl: migrate to [email protected] https://github.com/Homebrew/homebrew-core/pull/4591
Interphase answered 2/9, 2016 at 8:36 Comment(5)
Do you have any idea how you got to this broken version of curl in first place? Curl is already preinstalled on MacOS X, with https working just fine out of the box. Did you manually install or upgrade it to a newer version? If so - how did you do that?Chi
I don't know..but is there is any way to restore or install the correct version of it?Interphase
this is guessing only. It could probably make things worse for you. But what I would try to do is to run brew uninstall curl. Then execute "curl" again. maybe you'll then fall back to the default curl which comes with https support. If curl was completely removed, then you can do the ` brew install curl --with-libssh2 --verbose` afterwards. Again, this is risky. Brew might not be able to download anything without curl on your system. But that's the only suggestion I have :(Chi
updated my question, it didn't workInterphase
with this new OS, now i am facing the same issue :) smhCutup
C
5

After I've installed macOS High Sierra, I've encountered the same issue when install firebase via pod.

The trick was to remove the curl and install it again:

curl --version // you will see the https protocol is missing, and the version would be 7.56.1 if you did try to update it before  
brew remove curl 
brew install curl --with-darwinssl // install with darwin instead of openssl 
echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.zshrc // run this 

after you should close & quit all terminal or iTerm, then open it again run brew doctor then run curl --version you should see https in the protocol list

Then you should be good to go :)

Cutup answered 19/11, 2017 at 3:58 Comment(3)
Could not reproduce the error as of now, but will mark it up as helpful!Interphase
Didnt work for me .. Warning: curl: this formula has no --with-darwinssl option so it will be ignored!Saragossa
Great :). Works fineBename
A
3

You might need to update git. One way:

brew install git

More here

Arsyvarsy answered 2/9, 2016 at 21:18 Comment(5)
It didn't help, My libCurl Doesn't support 'https'. Bounty started!Interphase
More in this stackoverflow question and accepted answer - #19015782Arsyvarsy
And according to this one - #34914973 - do ./configure --with-darwinsslArsyvarsy
And according to justanothercoder.wordpress.com/2009/04/23/… do sudo port install curl @7.19.3_0+sslArsyvarsy
Since your curl is installed without https, according to justanothercoder.wordpress.com/2009/04/23/…, you need to do a sudo port deactivate before sudo port install or uninstall according to naleid.com/blog/2009/03/16/…Arsyvarsy
M
1

Your URL is corrupt. Check for spaces or other characters at the beginning of the URL (before http or https).

Maibach answered 17/5, 2019 at 22:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.