tonglin0325的个人主页

Scala学习笔记——安装

安装scala,不要使用sudo apt-get install scala来安装

1.从下面网址来下载Scala文件

1
2
http://www.scala-lang.org/download/2.11.8.html

2.下载下的 scala-2.11.8.tgz 文件解压,然后把文件mv到/usr/local目录下

3.在/etc/profile目录下加上,不要忘记了source

1
2
3
export SCALA_HOME=/usr/local/scala-2.11.8
export PATH=$SCALA_HOME/bin:$PATH

 4.打软链接

1
2
sudo ln -s /usr/local/scala-2.11.8/bin/scala /usr/bin

 5.在终端中输入scala

1
2
3
4
5
Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_65).
Type in expressions for evaluation. Or try :help.

scala>

6.退出

1
2
scala> :q