macOS Homebrew – Fixing Homebrew Installation Issues

homebrewmacos

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?

Best Answer

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.