User Tools

Site Tools



Homebrew is the recommended way of installing command-line programs and libraries that do not come with Mac OS X. It's significantly better than MacPorts, DarwinPorts, or Fink, and has a wide community contributing recipes for various software packages.

It's highly recommended that you install Homebrew as a regular user, not as root. However, you do need to have administrative rights to be able to install Homebrew.


sudo mkdir -p /usr/local
sudo chown -R $USER /usr/local
ruby -e "$(curl -fsSL" # NOTE: Interactive.
brew doctor # NOTE: Read the output to make sure there's nothing else you need to do.

We'll also install homebrew-cask, which will allow us to easily install pre-compiled binaries as well. Note that we change the default Caskroom directory location, so as not to pollute /opt.

brew tap phinze/cask
brew install brew-cask
sudo mkdir -p /usr/local/Caskroom
sudo chown -R $USER /usr/local/Caskroom
export HOMEBREW_CASK_OPTS='--appdir=/Applications --caskroom=/usr/local/Caskroom'
if ! grep 'HOMEBREW_CASK_OPTS' ~/.bashrc >/dev/null ; then
  echo >> ~/.bashrc ''
  echo >> ~/.bashrc '# Homebrew Cask'
  echo >> ~/.bashrc "export HOMEBREW_CASK_OPTS='--appdir=/Applications --caskroom=/usr/local/Caskroom'"

Bash Completion

mkdir -p /usr/local/etc/bash_completion.d
ln -sf /usr/local/Library/Contributions/ /usr/local/etc/bash_completion.d/
mac/homebrew.txt · Last modified: 2014/02/03 15:57 by