-2

I'm trying to using brew install sourcery command but I getting zsh: command not found: brew error!

I'm installed homebrew with using bellow command:

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

is there any way to fix this problem on the Macbook with M1 chip?

Habib Alejalil
  • 417
  • 1
  • 3
  • 17
  • Does this answer your question? [After installing Homebrew I get \`zsh: command not found: brew\`](https://stackoverflow.com/questions/36657321/after-installing-homebrew-i-get-zsh-command-not-found-brew) – fn control option Feb 14 '22 at 23:09

2 Answers2

3

Try this: export PATH="/opt/homebrew/bin:$PATH"

Jimmy Tan
  • 69
  • 7
1

Run next commands one by one:

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

echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> /Users/$USER/.zprofile

eval $(/opt/homebrew/bin/brew shellenv)

brew help