A developer's notes to upgrading to Maverick


I finally decided to give Maverick a spin after more than six months patiently waiting. It turns out that the migration went really smooth, most productive applications just work out of the box after the migration:

  • Tunnelblick and OpenVPN
  • Microsoft Office for Mac
  • Adium
  • Firefox
  • Chrome
  • iTerm2

Though most development-related tools are busted because of the missing dynamic libraries or runtime, here are my notes about the Maverick migration cleanup.

Install the toolchain

The very first task is to get the latest toolchain if you want to use homebrew: go to the Apple App Store and install XCode, and also the XCode command line utilities:

xcode-select --install

Cleanup the Cellar

It is very unlikely that the homebrew still work after the migration, it is also a good time to clean up your cellars. First, make a copy of the existing cellars:

ls /usr/local/Cellar > cellars

Then I nuked the cellars and started everything from the scratch:

sudo rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)
brew doctor

It is worthy noting that if you have several versions of python installed in /Library, the homebrew may link to the wrong python, such as vim.

sudo rm -rf  /Library/Frameworks/Python.framework/

Then install all the essential bits:

brew install zsh tmux vcsh mr vim macvim node phantomjs

It is always a good practice for periodic cellar maintenance:

brew update
brew upgrade
brew cleanup

Install the holy grail of Java

Once upon a time, Java is the alpha male in the Mac OSX, “preferred software package” with almost native look-and-feel. The glory is long gone, the JRE is not even shipped in Maverick by default. You could manually download the latest JDK or JRE from the official site. It is also worthy noting that the latest Java runtime is 64 bit only, and the Java applet will not work with the 32-bit Chrome browser. It is a pain of the butt to get self-signed Java applet running in Safari browser. The 64-bit Firefox is a life-saver if your have to work with Jupiter’s Network Connect applet.

Bootstrap python packages

As the global python libraries are installed in /Library/Python/2.7/site-packages/, all the 3rd-party libraries will be wiped off by the migration process. Let’s bootstrap some basic python packages before we come back to the cozy virtualenv.

sudo easy_install pip
sudo pip install virtualenv ipython tmuxp

I also run a nbconvert for nanoc, which depends on the jinja2 and pygments.

sudo pip install jinja2 pygments

The broken box

We use vagrant + virtualbox as our development stack. It would be a big surprise for me if VirtualBox were not broken. Just reinstall VirtualBox to get all the kernel modules re-registered, then the VirtualBox and vagrant will work as a charm.

The Octave

The octave is a poor man’s Matlab, and highly recommended by Andrew Ng in his popular Machine Learning class. It fell on the floor miserably after the migration, and I have to reinstall it from the scratch.

First, remove the octave

brew uninstall octave

Then, download AquaTerm from here unless you want to play with x11 gnuplot terminal.

brew install octave --without-docs

Building octave documents requires the MacTeX, a 2.36G gorilla. I could use the online resource then. The above command will pull all the dependencies, such as gfortran, qt, sip etc, and it may take a while to build. Once it is done, you might want to check the gnuplot integration first:

gnuplot -e 'show term'

  terminal type is aqua 0 title "Figure 0" size 846,594 font "Times-Roman,14" noenhanced solid

It looks like the terminal is set as aqua, just as we expected; then we can setup the term in octave:

octave:1> setenv('GNUTERM' 'aqua')

You might want to add this to your .octaverc to avoid the annoying notification.