The Easy Way to install Scala on Mac OS X
If you download Scala from the official site, it comes as a tgz archive of folders containing binaries. In other words, it’s a stand-alone install that you can put wherever you want. If you’re like me and would prefer Scala tucked away in the operating system, you’ll want to start by installing the awesome OS X package manager, Homebrew.
First, make sure you have Xcode installed (it’s free in the Mac App Store) with its optional command line tools installed (in Xcode go to Preferences, Downloads, and click “Install” next to Command Line Tools).
Next, install Homebrew by running the following in a terminal:
ruby -e “$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)”
Follow the instructions and enter your system password when prompted. Once Homebrew is installed, it’s super easy to install Scala by typing the following in a terminal:
brew install scala
Homebrew will install Scala in /usr/local, which is important for a number of reasons, and it also puts the man pages for the Scala tools in the appropriate place.
If your next step is to learn Scala, I’m finding “Programming in Scala” to be very helpful. It was written by the creator of Scala, Martin Odersky, and the first edition is free online at http://www.artima.com/pins1ed/.