安装brew报告,发现它找不到git,并死于错误。啤酒似乎已经被安装Brew找不到git,尽管git在路径中(Mac/OSX)
> brew
(打印常用的帮助)
...但brew doctor
不开心(成功):
这是我所得到的,当我运行(当我按照Homebrew主页的说明首次安装啤酒时)。
> brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: Git could not be found in your PATH.
Homebrew uses Git for several internal functions, and some formulae use Git
checkouts instead of stable tarballs. You may want to install Git:
brew install git
Error: Git is unavailable
Error: Failure while executing: /usr/local/bin/brew tap homebrew/core -q
我的路径:
> echo $PATH
/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Git是在这里:
> which git
/usr/bin/git
你检查过,如果你的git版本是> =一个brew需要的(如果指定的话) – pedrorijo91
@ pedrorijo91它没有。 – bfontaine
请运行'cd $(brew --prefix)&& git fetch && git reset --hard origin/master'然后再次运行'brew doctor'。 – bfontaine