Error installing Homebrew

China☆狼群 提交于 2019-12-11 11:39:30

问题


I am trying to install Homebrew on my system with the command mentioned on their homepage

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

but it's giving me following error -

-e:67: warning: Insecure world writable dir /usr/local in PATH, mode 040777
-e:96: warning: Insecure world writable dir /usr/local 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

If I try to do cleanup, it says that it can't find brew command. I'm clueless here as to if I have it installed on my machine why can't I run any of the brew commands.


回答1:


Run this:

xcode-select --install
rm -rf /usr/local/Cellar /usr/local/.git
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"



回答2:


Sounds like if you were to do an ls -al /usr you'd see that the local directory is drwxrwxrwx ... Have you tried chmod 775 /usr/local (that may or may not need sudo prepended).

Also, is brew installed in /usr/local/bin/brew? Or somewhere else?



来源:https://stackoverflow.com/questions/19532394/error-installing-homebrew

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