Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unexpected Git version: ''! You must install Git before installing Homebrew

Unexpected Git version: ''! You must install Git before installing Homebrew

I tried to install git with binary source and tried to install homebrew after that but got this error

like image 466
tryJackett Avatar asked Oct 28 '25 04:10

tryJackett


2 Answers

Also happening in M2 Mac

  1. Step 1 : delete git that's already installed open /usr/local/bin/
  2. Step 2 : reinstall homebrew using

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

like image 160
Yeh Daniel Avatar answered Oct 29 '25 18:10

Yeh Daniel


Okay! I've faced a similar issue and looks like we got this issue specifically in the m2 chip. So, what you can do is uninstall the git in your system and then try to install Homebrew again. I'm not sure what's the root cause but it did work for me.

like image 32
Ankit Pandey Avatar answered Oct 29 '25 20:10

Ankit Pandey