Homebrew-core: brew update fails with "Git must be installed and in your PATH!

Created on 26 Dec 2017  路  2Comments  路  Source: Homebrew/homebrew-core

Hi, trying to achieve installing cocoapods in the system.
Currently updating brew, but failed, because Git must be installed in PATH.
Please help....

$ brew update
Warning: git 2.15.1_1 is already installed
Error: Git must be installed and in your PATH!
Tomohisa-no-MacBook-Pro:local TomohisaSutani$ 

I know there are similar problems posted.
This is for my case. Many Thanks! in Advance.

$ brew config
HOMEBREW_VERSION: >=1.4.0 (shallow or no git repository)
ORIGIN: (none)
HEAD: (none)
Last commit: never
Core tap ORIGIN: (none)
Core tap HEAD: (none)
Core tap last commit: never
HOMEBREW_PREFIX: /usr/local
HOMEBREW_NO_ANALYTICS_THIS_RUN: 1
CPU: quad-core 64-bit broadwell
Homebrew Ruby: 2.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Clang: N/A
Git: N/A
Curl: 7.54.0 => /usr/bin/curl
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: N/A
macOS: 10.12.6-x86_64
Xcode: N/A
CLT: N/A
X11: 2.7.11 => /opt/X11

$ 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 or file an issue; just ignore this. 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

Warning: No developer tools installed.
Install the Command Line Tools:
  xcode-select --install

$which - a git
/usr/local/bin/git

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/TomohisaSutani/.rvm/bin

Most helpful comment

Thanks!
I could fix it by installing
xcode-select --install

All 2 comments

Xcode: N/A
CLT: N/A

So, as brew doctor told you

Install the Command Line Tools:
  xcode-select --install

Thanks!
I could fix it by installing
xcode-select --install

Was this page helpful?
0 / 5 - 0 ratings