by: Paul Horowitz
If you’re a Homebrew user who is now experiencing a “zsh: command not found: brew” error message in zsh shell, you’re probably perplexed as to why the brew command line line tool is no longer working.
The reason you may be experiencing the command not found error for brew is because the zsh shell is not able to find the brew binary to execute for whatever reason, either because something is awry with your $PATH, or the Homebrew installation, or both. Thus, to fix the brew command not found error, we will perform a series of actions to reinstall Homebrew and then set the path manually if things continue to fail.