Reputation: 95
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
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
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