While installing Octave 3.8 on a Mac is quite straight forward ([Link to the installer](the Octave 3.8.0 installer)), newer versions can definitely induce some headaches.
The following tips helped me to get the latest version (4.2.1) up and running:
Note: For the install process we use Homebrew, which is a package manager for OS X.
More information: Homebrew Project Page.
You should know your way around Terminal to follow the instructions.
- Open Terminal
- Install Homebrew:
ruby -e "$(curl --insecure -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Use the following script if you want to uninstall Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)")
- Tap Homebrew Science:
brew tap homebrew/science(more info)
- Be sure to be on the latest version
brew update && brew upgrade
- We will need XQuartz:
brew cask install XQuartz
- Now everything is ready for the install of octave:
brew install octave
(Depending on your machine this can take a long time (on my Macbook it took around 45 min), as some dependencies have to be compiled)
- Launch Octave from the Terminal: