目 录CONTENT

文章目录

【运维】Ubuntu 安装Scala

EulerBlind
2025-07-01 / 0 评论 / 0 点赞 / 2 阅读 / 0 字

下载Scala

官方地址

<https://www.scala-lang.org/download/>

下载安装命令

curl -fL <https://github.com/coursier/coursier/releases/latest/download/cs-x86_64-pc-linux.gz> | gzip -d > cs && chmod +x cs && ./cs setup

安装输出

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 19.9M  100 19.9M    0     0  9919k      0  0:00:02  0:00:02 --:--:-- 23.0M
Checking if a JVM is installed
Found a JVM installed under /usr/lib/jvm/java-11-openjdk-amd64.

Checking if ~/.local/share/coursier/bin is in PATH
  Should we add ~/.local/share/coursier/bin to your PATH via ~/.profile, ~/.zprofile? [Y/n] y

Checking if the standard Scala applications are installed
  Installed ammonite
  Installed cs
  Installed coursier
  Installed scala
  Installed scalac
  Installed scala-cli
  Installed sbt
  Installed sbtn
  Installed scalafmt

验证安装

新打开一个bash/zsh 窗口,输入如下命令

scala -version

输出结果如下

Scala code runner version 3.4.0 -- Copyright 2002-2024, LAMP/EPFL

0

评论区