尝试在Mac M1上安装Scala时遇到问题

avkwfej4  于 2022-11-09  发布在  Scala
关注(0)|答案(1)|浏览(583)

我想开始使用Scala。我有一台Mac M1计算机,所以我遵循了on this reddit post的说明,这似乎与official website中的说明相同。的确如此。

$ brew install coursier/formulas/coursier
$ cs setup

其输出为(cs setup的输出)

Checking if a JVM is installed
Found a JVM installed under /Users/johnsmith/Library/Caches/Coursier/arc/https/github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jdk_x64_mac_hotspot_8u292b10.tar.gz/jdk8u292-b10/Contents/Home.
  Should we update ~/.profile, ~/.config/zsh/.zprofile, ~/.bash_profile? [Y/n] y

Checking if ~/Library/Application Support/Coursier/bin is in PATH
  Should we add ~/Library/Application Support/Coursier/bin to your PATH via ~/.profile, ~/.config/zsh/.zprofile, ~/.bash_profile? [Y/n] y

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

显然,这应该会安装以下程序
S本身,以进一步管理您的Scala环境

scala-cli,编译/运行/打包Scala代码的便捷工具
Scala,Scala REPL
scalac,Scala编译器
sbt和sbtn,从sbt构建到旧的
菊石,Scala的增强型REPL
scalafmt,Scala代码格式化程序

但我不能访问他们中的任何一个。例如,当我这样做的时候

scala -version

我得到

zsh: command not found: scala

相关问题