Install Scala from the Fedora yum repository
In the repository for Fedora 17, it is scala 2.9.2
# yum install scala
Prepare the Java environment for Scala
However, if you invoke
scala directly after installed it, you will likely get an error message like this:
/usr/bin/scala: error: JVM_LIBDIR /usr/lib/jvm-exports/java does not exist or is not a directory
It looks there is something related to Java is not correct.
/bin/scala and searching for Java, the first line that sets up a red flag is:
So to make Scala happy, let’s prepare the directories for it.
Prepare the jvm-exports directory:
$ cd /usr/lib/jvm-exports/ $ sudo ln -s /usr/java/jdk1.6.0_24/lib/ ./java
Prepare the jvm directory:
$ cd /usr/lib/jvm $ sudo ln -s /usr/java/jdk1.6.0_24/ ./java
By now, scala should work in Fedora 17 Linux.