Macos Mac-Can’;不要安装自制软件

Macos Mac-Can’;不要安装自制软件,macos,osx-mountain-lion,homebrew,Macos,Osx Mountain Lion,Homebrew,我尝试像这样安装自制软件: ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)" 它安装不正确,所以我关闭了终端并重试。现在,它向我显示以下消息: It appears Homebrew is already installed. If your intent is to reinstall you should do the following before running this installer again: rm -rf

我尝试像这样安装自制软件:

ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
它安装不正确,所以我关闭了终端并重试。现在,它向我显示以下消息:

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
我试着那样做,但没有成功。将显示以下消息:

brew: command not found

所以,问题是安装了自制软件,但实际上没有安装。如何解决这个问题有什么建议吗?谢谢大家!

第一次安装不正确时给出的消息是什么?brew二进制文件是否存在于/usr/local/bin中?如果是这样,您可能只需要将其添加到路径中,请参阅:

您正在使用的命令中包含的URL不正确。Ruby将转储掉几行HTML,然后失败。请改用此命令:

ruby-e“$(curl-fsSkL raw.github.com/Homebrew/Homebrew/go/install)”

这对我很有用:


ruby-e“$(curl-fsSLhttps://raw.github.com/Homebrew/homebrew/go/install)“

这似乎解决了我的问题

rm -rf /usr/local/Cellar /usr/local/.git
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
后来,我现在可以了

brew doctor
您也可以在下面的使用页面上找到链接到的要点:


这是我的工作

试图解决同一问题时,我发现我在更改路径时输入错误。我没有
/usr/local/bin
。然后我建议你跑步

$echo$PATH

在终端中查看是否有正确的目录。您还可以运行

$vi~/.bash_配置文件


为了查看它并在必要时进行更改,我删除了文件夹
/usr/local/.git
,然后安装了homebrew。

如果无法使用curl进行安装,请尝试从浏览器打开安装脚本,将其保存在磁盘上名为I.e brew\u install.rb的文件中,并在本地运行该脚本

ruby brew_install.rb 

这对我有用。

这是最新的一个对我有用的

Follow these steps 
1 ==> ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

2 ==> sudo rm -rf /usr/local/Homebrew/
      sudo rm -rf /usr/bin/Homebrew/

3 ==> install brew
      1 -- /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

      2 -- sudo chown -R $(whoami) /usr/local/var/homebrew

If get these error try below command
  Error: Failed to link all completions, docs and manpages:
        sudo chown -R $(whoami) /usr/local/*

  then follow these commands
        /usr/local/bin/brew update --force
/usr/bin/ruby-e“$(curl-fsSL)https://raw.githubusercontent.com/Homebrew/install/master/install)“


我在这里找到它,以防以后更新

任何读到这篇文章的人。现在应该使用这个命令:ruby-e“$(curl-fsSL)嗨,韦斯利,欢迎来到SO!我知道你还没有名声,但仅供参考,将来这可能只是一个评论,而不是问题的答案。:)是的,你的第一行
rm-rf/usr/local/Cellar/usr/local/.git
是删除损坏的部分安装的关键!安装程序链接(您的第二行)但是已经更新为
ruby-e“$(curl-fsSL)https://raw.githubusercontent.com/Homebrew/install/master/install)“
thumb up!!!!!!!!!我在本页其他地方尝试了所有的命令行解决方案,无论出于何种原因,它们都不起作用。最后,我尝试按照AlexAffe的建议手动删除
usr/bin/.git
,然后是
ruby-e”$(curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"
,我可以在Mac电脑上重新安装自制软件。
Follow these steps 
1 ==> ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

2 ==> sudo rm -rf /usr/local/Homebrew/
      sudo rm -rf /usr/bin/Homebrew/

3 ==> install brew
      1 -- /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

      2 -- sudo chown -R $(whoami) /usr/local/var/homebrew

If get these error try below command
  Error: Failed to link all completions, docs and manpages:
        sudo chown -R $(whoami) /usr/local/*

  then follow these commands
        /usr/local/bin/brew update --force