Installing an older version of a brew formula

When I installed Hive using Homebrew it installed the latest version (0.12.0 by the time), but when I work with Amazon EMR, their AMI comes with Hive 0.11.x. So I had to downgrade the Hive on my local computer.

First of all, I had to uninstall it:

$ brew uninstall hive

Check with versions were available:

$ brew versions hive
0.12.0   git checkout cc51108 Library/Formula/hive.rb
0.11.0   git checkout 9cd8ee0 Library/Formula/hive.rb
0.10.0   git checkout 2ce9fe6 Library/Formula/hive.rb
0.9.0    git checkout ce2f7e1 Library/Formula/hive.rb
0.8.0    git checkout ba14539 Library/Formula/hive.rb
0.7.1    git checkout 1c92c25 Library/Formula/hive.rb
0.5.0    git checkout 14e4db3 Library/Formula/hive.rb

Move to brew install directory (/usr/local by default):

cd $(brew --prefix)

Now checkout the 0.11.0 version:

$ git checkout 9cd8ee0 Library/Formula/hive.rb

Install Hive:

$ brew install hive


You must leave the the checkout on this version, otherwise on the next brew upgrade Hive will also be upgraded.

Gustavo Arjones

Always Learning, Geek, Curious