Installing Octave on my MacBook via Homebrew

Andrew Ng's Machine Learning course on Coursera brought about the need for me to install Octave on my MacBook. Since I had only two days before I could submit my first Octave assignment without any penalty, I decided to use the simplest method to get Octave running on my MacBook.

This post documents the steps that I took to install Octave on my MacBook via Homebrew.

Getting a copy of Homebrew on my MacBook

To get a copy of Homebrew on my MacBook, I opened a terminal instance and typed in the following command:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Installing XQuartz

The next step that I did was to install XQuartz on my MacBook. To install XQuartz on my MacBook, I downloaded the XQuartz .dmg file to my filesystem, double-clicked on the file and followed the instructions given by the installation wizard.

Brewing Octave and its dependencies via Homebrew

Once I had installed XQuartz, I proceeded to run the following brew commands to get Octave and its dependencies running on my MacBook:

brew tap homebrew/science
brew update && brew upgrade
brew install gcc
brew install fltk
brew install gnuplot

With that, I was able to start working on my first assignment and complete it before the deadline.

About Clivant

Clivant a.k.a Chai Heng enjoys composing software and building systems to serve people. He owns techcoil.com and hopes that whatever he had written and built so far had benefited people. All views expressed belongs to him and are not representative of the company that he works/worked for.