Skip to content

Instantly share code, notes, and snippets.

@natritmeyer
Last active December 10, 2015 22:18
Show Gist options
  • Save natritmeyer/4501285 to your computer and use it in GitHub Desktop.
Save natritmeyer/4501285 to your computer and use it in GitHub Desktop.
Install specific versions of a library from Homebrew
#substitute LIBNAME for the library you want. Eg: grails
brew tap homebrew/versions
brew versions LIBNAME
#2.1.2 git checkout 5c5b964 /usr/local/Library/Formula/grails.rb # <== we want this version
#2.1.3 git checkout d08ef78 /usr/local/Library/Formula/grails.rb
#2.1.1 git checkout 1bcf5af /usr/local/Library/Formula/grails.rb
#...
cd /usr/local
git checkout 5c5b964 Library/Formula/LIBNAME.rb # <== notice the hash, it's a reference to the version we want
cd -
brew install LIBNAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment