0

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
  • 435
  • 1
  • 4
  • 17
  • 1
    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

5

Try this:

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

Jimmy Tan
  • 89
  • 1
  • 8
3

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