Skip to main content

Homebrew

Homebrew calls itself The missing package manager for macOS and is an essential tool for any developer.

Installation

Before you can run Homebrew you need to have the Command Line Tools for Xcode installed. It include compilers and other tools that will allow you to build things from source.

To install homebrew visit https://brew.sh/

Once done, execute below commands depending on the shell type. To determine shell type execute

ps -p $$ -o comm
For bash
echo '# Brew' >> ~/.bash_profile
echo 'export BREW_HOME="/opt/homebrew"' >> ~/.bash_profile
echo 'export PATH="$BREW_HOME/bin:$PATH"' >> ~/.bash_profile
For zsh
echo '# Brew' >> ~/.zshrc
echo 'export BREW_HOME="/opt/homebrew"' >> ~/.zshrc
echo 'export PATH="$BREW_HOME/bin:$PATH"' >> ~/.zshrc

Verification

brew doctor

If everything is good, you should see no warnings, and a message that you are "ready to brew!".