How to set HomeBrew in an M1 Mac

What problems happens here?

When I installed brew following the instruction from the Homebrew official website, the error zsh: command not found: brew happens.

How to fix this problem?

I fixed this problem by editing the path, creating the missing .zshrc file, and exploring the path to this new file.

1
2
3
4
5
cd /opt/homebrew/bin/
PATH=$PATH:/opt/homebrew/bin
cd
touch .zshrc
echo export PATH=$PATH:/opt/homebrew/bin >> .zshrc
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
© 2020 Lingyun Yang
Built with Hugo
Theme Stack designed by Jimmy