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 https://raw.github.com/mxcl/homebrew/go)" # 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
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'" fi
mkdir -p /usr/local/etc/bash_completion.d ln -sf /usr/local/Library/Contributions/brew_bash_completion.sh /usr/local/etc/bash_completion.d/