Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

brew installation error : Appears homebrew is already installed

Tags:

homebrew

unknown7cd1c37eb7ca:local shoaibali$ ruby -e "$(curl -fsSL   https://raw.github.com/mxcl/homebrew/go)"
-e:67: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
-e:96: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
unknown7cd1c37eb7ca:local shoaibali$ ls
CONTRIBUTING.md     foreman         hw_mp_userdata
Library         git         libexec
PortDetect.log      heroku          opt
bin         hw_mobile_userdata  share
unknown7cd1c37eb7ca:local shoaibali$

I have some problems with my brew when I was trying to install ffmpeg. I think I did the immature thing (note - after hours of trying) of uninstalling brew (through some article i read online) and trying to reinstall it. But the above output comes in my terminal when I try to install brew again. How can it say Homebrew is already installed when clearly the Cellar file isn't there ?

like image 473
Shonu93 Avatar asked Nov 30 '22 12:11

Shonu93


1 Answers

I had the same issue. There was no directory called., /usr/local/Cellar but brew installation kept reporting it is already installed.

I resolved the issue by doing the following.,

Step 1 : run

  rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup

(It reported error and didn't run successfully., but I believe it did cleanup)

Step 2 : Being from Windows world., restarted the terminal

Step 3 : Ran again

 ruby -e "$(curl -fsSL   https://raw.github.com/mxcl/homebrew/go)"

It ran successfully.,

like image 61
Sairam Krish Avatar answered Dec 02 '22 00:12

Sairam Krish