I had the same issue today, on Mac OS Big Sur (with M1 chip).
The problem is indicated in the warning : Warning: /opt/homebrew/bin is not in your PATH. It seems that it is the directory where the binaries of hombrew are put.
To resolve, you can do :
- Edit your
~/.zshrcor~/.bashrcwith at the end of file:
export PATH=/opt/homebrew/bin:$PATH
After this, tap source ~/.zshrc in your terminal or restart it.
For more infos about the current status of Homebrew on Mac with a M1 chip :
Apple Silicon support in Homebrew
Edit :
As mentioned by @kangkyu in this comment, Homebrew is changing to version 3.0.0 which supports officially Apple Silicon. If you have a prior version just brew update.