Installing Scala 2.9 nightly build

1.1k views Asked by At
2

There are 2 answers

3
Daniel C. Sobral On BEST ANSWER

Just extract it someplace and make sure its bin subdirectory is on the PATH, as well as java.

1
Rex Kerr On

You have to do it by hand. I usually put my builds in

/usr/share/scala

but there are other places that make sense. Anyway, I'd start off by

sudo mkdir /usr/share/scala
cd /usr/share/scala
tar zxf scala-2.9.0.r24301-b20110218020036.tgz
ln -s scala-2.9.0.r24301-b20110218020036 2.9

Now we've got Scala in place and we have a soft link to /usr/share/scala/2.9 that we can keep pointing at new builds as we unpack them.

If you have Ubuntu's out-of-date Scala installed, you'll probably want to replace or rename those commands. Ubuntu places Scala commands in /usr/local/bin/, so you need to re-point those to the right place:

sudo mv /usr/local/bin/scala /usr/local/bin/oldscala
sudo ln -s /usr/share/scala/2.9/bin/scala /usr/local/bin/scala
# same thing for scalac, fsc, scaladoc

and then you should be set. Ubuntu doesn't bother setting environment variables, and Scala works fine without it.