本文共 1838 字,大约阅读时间需要 6 分钟。
安装fedora在u盘
This introduces how to install Scala 2.9.2 on 64-bit Fedora 17. There are some changes needed to make scala work on Fedora Linux 17. Please check it out in the answer.
本介绍如何在64位Fedora 17上安装Scala 2.9.2。要使Scala在Fedora Linux 17上工作,需要进行一些更改。请在答案中进行检查。
Scala depends on Java, so please install Java first. In this tutorial, we installed to: /usr/java/jdk1.6.0_24/lib/
.
Scala依赖Java,因此请先安装Java。 在本教程中,我们将安装到: /usr/java/jdk1.6.0_24/lib/
。
In the repository for Fedora 17, it is scala 2.9.2
在Fedora 17的存储库中,它是scala 2.9.2。
# yum install scala
However, if you invoke scala
directly after installed it, you will likely get an error message like this:
但是,如果在安装后直接调用scala
,则可能会收到如下错误消息:
/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.
看来有一些与Java有关的东西是不正确的。
After checking /bin/scala
and searching for Java, the first line that sets up a red flag is:
在检查/bin/scala
并搜索Java之后,设置红色标记的第一行是:
export JAVA_HOME=/usr/lib/jvm/java/
I don’t understand why the JAVA_HOME should be hard coded. I don’t want to change the files for Scala neither so that I need not to edit the file every time I update it.
我不明白为什么应该对JAVA_HOME进行硬编码。 我也不想更改Scala的文件,因此不必在每次更新时都编辑文件。
So to make Scala happy, let’s prepare the directories for it.
因此,为了使Scala开心起来,让我们为其准备目录。
Prepare the jvm-exports directory:
准备jvm-exports目录:
$ cd /usr/lib/jvm-exports/$ sudo ln -s /usr/java/jdk1.6.0_24/lib/ ./java
Prepare the jvm directory:
准备jvm目录:
$ cd /usr/lib/jvm$ sudo ln -s /usr/java/jdk1.6.0_24/ ./java
By now, scala should work in Fedora 17 Linux.
现在,scala应该可以在Fedora 17 Linux中使用。
翻译自:
安装fedora在u盘
转载地址:http://wmowd.baihongyu.com/