Today, I’ve just got new M1 Macbook Pro from my work. I have to re-setup my development envirnoment. So I noted my process here.
What is Homebrew
Homebrew is a package installer that helps us install the stuff you need that MacOS didn’t.
For example, you need PHP, you can install it using Homebrew.
Install Homebrew
To install Homebrew, you can follow this page or run this command in Terminal:
1
2
# Terminal: Development
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
After the installation completed, run these commands in your Terminal:
1
2
3
4
# Terminal: Development
export PATH="/opt/homebrew/bin:$PATH"
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> $HOME/.zshrc
source ~/.zshrc
Final, use this command to check to make sure it works
1
2
# Terminal: Development
brew doctor