Paul Solt
Paul Solt

Reputation: 8405

Cocoapods fails "https" not supported or disabled in libcurl

When I try to install a Cocoapod (Firebase), I see this issue.

Installing Firebase (4.7.0)

[!] Error installing Firebase
[!] /usr/local/bin/curl -f -L -o /var/folders/xv/ghl7s0wx2m3_0hwh15spwfrc0000gn/T/d20171222-26613-2tuztl/file.tgz https://dl.google.com/dl/cpdc/51a9c1fa1090163e/Firebase-4.7.0.tar.gz --create-dirs --netrc-optional

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

Why is this happening?

Upvotes: 0

Views: 793

Answers (1)

Paul Solt
Paul Solt

Reputation: 8405

You might have rebuilt or replaced curl with a version that doesn't have SSL support.

To fix it you'll need to make sure the curl version is built with SLL. Follow these steps:

  • Download and install OpenSSL
  • https://www.openssl.org/source/
  • On Mac:

        ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl \
                -Wl,-rpath,/usr/local/ssl/lib
        make
        sudo make install
    
  • Install curl on Mac with SSL configured, otherwise your curl commands with https will fail.

    • On Mac:

      ./configure --with-ssl
      make
      sudo make install
      
    • Verify that SSL is setup after your configure step, you should see something like the following text:

       SSL support:      enabled (OpenSSL)
      
  • Now try to install your Cocoapods.

         pod install
    
  • You should see the https curl dependencies complete:

    Analyzing dependencies
    Downloading dependencies
    Installing Firebase (4.8.0)
    Installing FirebaseAnalytics (4.0.5)
    Installing FirebaseCore (4.0.13)
    

Upvotes: 1

Related Questions