ref: https://brew.sh/
Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
A warning may appear here
"Warning: /opt/homebrew/bin is not in your PATH. Instructions on how to configure your shell for Homebrew can be found in the 'Next steps' section below."
Add Homebrew to your PATH: Add the following line to your shell configuration file.
For Zsh:
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc
For Bash:
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.bash_profile
Reload your shell configuration
For Zsh:
source ~/.zshrc
For Bash
source ~/.bash_profile