How to install an older version of scala
brew search scala
then you will find all the available versions like below
scala [email protected] [email protected] scalaenv scalariform scalastyle
homebrew/science/scalapack Caskroom/cask/scala-ide
Then choose whichever version you want to install. say if you want to install scala 2.11 then you can do that by runnig the command like below
brew install [email protected]
If you manage your project with sbt
, the scala built tool, either directly or via IntelliJ, the version of scala for that code is defined in the build file (build.sbt
or Build.scala
):
scalaVersion := "2.10.5"
Choosing this path, there isn't even a need to install scala on your Mac at all. Each project will have its own version -- pulled from your local ivy
repository, so it doesn't have to download it each time.
And rather than typing scala
to get to the REPL, you type sbt console
to get to the REPL with the project's scala version and dependencies loaded.
The following should work for Homebrew 0.9.5:
Install Tapped version of Scala 2.10
brew install homebrew/versions/scala210
Unlink version of Scala 2.11 (if installed)
brew unlink scala
Link Tapped version of Scala 2.10
brew link scala210 --force
Check scala version
scala -version