I am trying to install Homebrew on OSX El Capitan. All latest OSX and Xcode updates have been installed.

I am using this command in terminal:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

And I get this response:

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

Elsewhere I read that you can run this command to fix:

sudo port install curl +ssl

But this gave me:

sudo: port: command not found

Can anybody help?

  • Did you install curl from any source? What output do you get if you type which curl in the terminal? The port command is from macports which is a tool similar to homebrew. I would not recommend using both at the same time. Jan 25 '16 at 9:51
  • For which curl I get /usr/local/bin/curl. I don't believe I have installed another curl (i don't even know what curl is).
    – rf_wilson
    Jan 25 '16 at 9:56
  • 2
    Okay, it seems that "something" has installed a curl in your local folder. Try using the command you used before but instead of curl use /usr/bin/curl to use the system version. Jan 25 '16 at 10:00
  • That worked! How odd - do you know how I can remove this other curl?
    – rf_wilson
    Jan 25 '16 at 10:06

I am summarising my answer from comments.

In your case it seems that something has installed a version of curl without into https support into your local folder. Maybe you tried to compile it yourself (the standard .configure && make && make install procedure installs programs into /usr/local for example.

You can force the command to use system curl by replacing curl by /usr/bin/curl in it, thus use:

ruby -e "$(/usr/bin/curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

When you have Homebrew successfully installed you can re-install the curl in your local folder by using:

brew install curl

There might be some additional steps as you have to overwrite files that are already there. You might need to use the --overwrite option.

  • Thank you, thank you, thank you! I found this issue to be a supreme head#### as I needed cURL SSL to install brew, then apparently some people's advice was to use brew to install cURL with SSL! Your solution a godsend! I just need to do clean reinstall of gradle for Android SDK Mar 4 '18 at 1:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .