2015-01-26 107 views
1

我曾经安装过自制软件,但后来在某个时候崩溃了,所以我试着重新安装它。 我试图运行:Homebrew不再工作

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

它给了:

-e:70: 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 

(我不知道为什么它说,它被安装,运行酿赋予 “的zsh:找不到命令:酿造”) 所以我试着运行:

zsh: command not found: brew 

然后我试着运行它没有brew clean-up。其中执行。我重新运行:

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

它开始下载和安装,直到它得到了这一点:

Downloading and installing Homebrew... 
remote: Counting objects: 226839, done. 
remote: Compressing objects: 100% (59610/59610), done. 
remote: Total 226839 (delta 165997), reused 226815 (delta 165979) 
Receiving objects: 100% (226839/226839), 52.14 MiB | 135.00 KiB/s, done. 
Resolving deltas: 100% (165997/165997), done. 
From https://github.com/Homebrew/homebrew 
* [new branch]  master  -> origin/master 
warning: unable to access 'bin/.gitattributes': Permission denied 
error: unable to create file bin/brew (Permission denied) 
fatal: Could not reset index file to revision 'origin/master'. 
Failed during: git reset --hard origin/master 

尝试添加须藤:

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

给出:

Don't run this as root! 

我不知道该从哪里出发。有人能帮我吗?

+0

这似乎纯粹是一个安装问题,更适合http:// SuperUser .COM? – 2015-01-26 20:24:20

+0

@PaulSasik:我认为这属于这个条款:“除非他们直接涉及主要用于编程的工具”,但我确实看到了你的观点。 – Dair 2015-01-26 20:25:13

回答

0

您是否在安装zsh后重新启动终端? brew可能没有加载zshell。您还需要在.zshrc中添加usr/local /到您的$路径.zsh配置文件应该位于根目录〜/ .zshrc中

+0

是的,我有一段时间zsh(所以我已经重新启动它)。有一段时间我一直在使用virtualbox,并没有需要自制软件,但是我遇到了一些与virtualbox碰到的问题,并且需要再次使用自制软件。不过谢谢你的回应。 – Dair 2015-01-26 20:29:09

+0

另外,usr/local在路径中。 – Dair 2015-01-26 20:44:06