Follow the standard way of running:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"If it worked well bingo, bango! but if some fatal: ref... error happened or it stucked at the final stage of installation with similar error:
- press
Ctrl+Cto break the running process and back to command line - enter
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc - enter
eval "$(/opt/homebrew/bin/brew shellenv)" - enter
brew tap --repair - enter
brew cleanup - enter
brew update-reset - and finally run
brew updateto get everything is updated and from now on everything will work as expected.