scala not on path after installing typesafe-stack on Ubuntu

738 views Asked by At

On Ubuntu 12.04, I have installed typesafe-stack following the instructions here.

After doing so, I do not have scala or scalac on my PATH. I do have sbt, and I can run console from there, but I do not have any native Scala executables installed.

Where is scalac supposed to be installed? Why has it not been so? How do I fix it?

2

There are 2 answers

0
Elnur Abdurrakhimov On

The Typesafe stack for Debian-based systems doesn't come with Scala itself, so you have to install it manually:

sudo aptitude install scala -y
0
joerx On

Scala is compiled into Java bytecode (or .NET CLR if you want to), so technically there's no need to have the binary installed. Sbt downloads and installs the Scala Compiler on first run or so, that's why things like sbt, sbt console and even running Play 2 applications works.

To get the interpreter, use apt-get as mentioned above, the version is different from the one the Typesafe Stack uses (2.9.2 vs. 2.9.1), but I did not have any trouble so far. Seems like sbt is using the correct version defined for the project and even dependencies are stored separately (just check ~/.ivy/cache to see what I mean)