brew installation error : Appears homebrew is already installed

巧了我就是萌 提交于 2019-12-10 15:54:30

问题


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$

Hey guys, I was having 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 ?


回答1:


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.,




回答2:


A simple

sudo rm -rf /usr/local/.git

fixed my problem and I could re-install brew




回答3:


I tried this solution but running "brew cleanup" when the system doesn't detect brew is not possible XD

I came up with a possible solution... I've tried to install MacPort and also didn't installed well, but it seems to uninstall (somehow) brew, so I could reinstall it from scratch

And this time it works! So, maybe it helps somebody!

PS: I think my original problem was that I had internet connection problem when I installed Brew for the first time, and didn't installed well



来源:https://stackoverflow.com/questions/18555378/brew-installation-error-appears-homebrew-is-already-installed

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!