New MacBook Homebrew Install Issue

Viewed 29

I have a Macbook Pro that has an M1 Chip that is causing issues trying to install Homebrew. I have followed the steps in this article: https://mac.install.guide/homebrew/3.html but when I get to the Homebrew install and I type brew in the terminal I get this

Example usage: brew search TEXT|/REGEX/ brew info [FORMULA|CASK...] brew install FORMULA|CASK... brew update brew upgrade [FORMULA|CASK...] brew uninstall FORMULA|CASK... brew list [FORMULA|CASK...]

Troubleshooting: brew config brew doctor brew install --verbose --debug FORMULA|CASK

Contributing: brew create URL [--no-fetch] brew edit [FORMULA|CASK...]

Further help: brew commands brew help [COMMAND] man brew https://docs.brew.sh

Shouldn't it tell me what version of Homebrew I have and that it's installed?

I am trying to set up my Homebrew so that I can use it with git. I am trying to do brew install git and brew install git-lfs but I get the below error messages when I try to do that.

fatal: Could not resolve HEAD to a revision Warning: No available formula with the name "git". ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching for a previously deleted formula (in the last month)... Error: No previously deleted formula found. ==> Searching taps on GitHub... Error: No formulae found in taps.

1 Answers

Shouldn't it tell me what version of Homebrew I have and that it's installed?

To find the installed version, use the -v option.

% brew  -v
Homebrew 3.6.0
Homebrew/homebrew-core (git revision e5722d08e47; last commit 2022-09-09)
Homebrew/homebrew-cask (git revision 0dc06a0f09; last commit 2022-09-09)

fatal: Could not resolve HEAD to a revision

You will need to reinstall, and make sure it uses /opt/homebrew because you are on an M1.

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

There shouldn't be any errors displayed when this runs.

Related