install: Install script CentOS 7 can't find git
- your problem was from running the official
installoruninstallscript? - after installation: ran
brew configandbrew doctorand included their output with your issue? If you couldn’t install: provided your OS version with the output of your issue?
[osalbahr@vclvm177-222 ~]$ cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[osalbahr@vclvm177-222 ~]$ uname -a
Linux vclvm177-222.vcl.ncsu.edu 3.10.0-1160.81.1.el7.x86_64 #1 SMP Fri Dec 16 17:29:43 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
[osalbahr@vclvm177-222 ~]$
What you were trying to do (and why)
I was trying to install Homebrew so I can brew install neofetch.
What happened (include command output)
You must install Git before installing Homebrew
[osalbahr@vclvm177-222 ~]$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ==> Checking for `sudo` access (which may request your password)... ==> This script will install: /home/linuxbrew/.linuxbrew/bin/brew /home/linuxbrew/.linuxbrew/share/doc/homebrew /home/linuxbrew/.linuxbrew/share/man/man1/brew.1 /home/linuxbrew/.linuxbrew/share/zsh/site-functions/_brew /home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew /home/linuxbrew/.linuxbrew/HomebrewPress RETURN/ENTER to continue or any other key to abort: ==> /usr/bin/sudo /bin/chown -R osalbahr:NCSU /home/linuxbrew/.linuxbrew/Homebrew You must install Git before installing Homebrew. See: https://docs.brew.sh/Installation [osalbahr@vclvm177-222 ~]$
What you expected to happen
I expected the install script to go through, since I do have git installed:
[osalbahr@vclvm177-222 ~]$ git --version git version 1.8.3.1 [osalbahr@vclvm177-222 ~]$ which -a git /usr/bin/git [osalbahr@vclvm177-222 ~]$ echo $PATH /usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/osalbahr/.local/bin:/home/osalbahr/bin [osalbahr@vclvm177-222 ~]$ sudo yum install -y git Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: linux-mirrors.fnal.gov * epel: forksystems.mm.fcix.net * extras: distro.ibiblio.org * updates: centos.mirror.constant.com Package git-1.8.3.1-24.el7_9.x86_64 already installed and latest version Nothing to do [osalbahr@vclvm177-222 ~]$ sudo dnf install -y git Last metadata expiration check: 0:03:10 ago on Wed 17 May 2023 11:12:33 AM CDT. Package git-1.8.3.1-24.el7_9.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete! [osalbahr@vclvm177-222 ~]$
The same happens after `sudo yum update && sudo reboot`
[osalbahr@vclvm177-222 ~]$ sudo yum update Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: coresite.mm.fcix.net * epel: download-ib01.fedoraproject.org * extras: mirrors.lug.mtu.edu * updates: mirror.wdc2.us.leaseweb.net No packages marked for update [osalbahr@vclvm177-222 ~]$ cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) [osalbahr@vclvm177-222 ~]$ uname -a Linux vclvm177-222.vcl.ncsu.edu 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux [osalbahr@vclvm177-222 ~]$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ==> Checking for `sudo` access (which may request your password)... ==> This script will install: /home/linuxbrew/.linuxbrew/bin/brew /home/linuxbrew/.linuxbrew/share/doc/homebrew /home/linuxbrew/.linuxbrew/share/man/man1/brew.1 /home/linuxbrew/.linuxbrew/share/zsh/site-functions/_brew /home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew /home/linuxbrew/.linuxbrew/HomebrewPress RETURN/ENTER to continue or any other key to abort: ==> /usr/bin/sudo /bin/chown -R osalbahr:NCSU /home/linuxbrew/.linuxbrew/Homebrew You must install Git before installing Homebrew. See: https://docs.brew.sh/Installation [osalbahr@vclvm177-222 ~]$
I’m not sure what find_tool does.
#574 might be related. If this is a case of git version issue, the install script might benefit from a different error message.
Step-by-step reproduction instructions (by running brew commands)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 20 (20 by maintainers)
Commits related to this issue
- Fix git outdated error saying git is not installed Fixes #773 — committed to ChillerDragon/install by ChillerDragon a year ago
I see. Shouldn’t “Unexpected Git version …” be printed then?