sc1892353
sc1892353

Reputation: 95

Homebrew failed on installation, but now won't uninstall

I used the following command to install Homebrew:

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

Which then returns this as an error:

It appears Homebrew is already installed. If your intent is to reinstall you should do the following before running this installer again:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

When I run that command in terminal, I simply get "Failed to locate Homebrew!"

Upvotes: 3

Views: 6028

Answers (2)

sidarcy
sidarcy

Reputation: 3008

I had the same issue on mac OS. A lot of answers on here advised me to remove /usr/local/.git but this did not exist. My solution was as follows:

I navigated to:

/usr/local/Homebrew/bin

And ran:

./brew doctor

It warned me Homebrews bin was not found and advised me to add it to my .bash_profile like so:

echo 'export PATH="/usr/local/Homebrew/bin:$PATH"' >> ~/.bash_profile

After this I started a new session and I was back brewing

Upvotes: 5

elTorres74
elTorres74

Reputation: 31

I was at same situation and do this:

sudo rm -rf /usr/local/.git
chown <your_username> /usr/local

After that, I can install Homebrew.

Upvotes: 3

Related Questions