Brew dependencies can't be satisfied, MacOS M1

Hi

I’m unable to install dotty on an M1 MAC as the homebrew formula depends on openjdk@8, which isn’t available for M1 macs.

If you try and install an alternative JDK you get the following:

➜  scala3-playground brew install --cask homebrew/cask-versions/adoptopenjdk8
==> Tapping homebrew/cask-versions
Cloning into '/opt/homebrew/Library/Taps/homebrew/homebrew-cask-versions'...
remote: Enumerating objects: 247422, done.
remote: Counting objects: 100% (270/270), done.
remote: Compressing objects: 100% (116/116), done.
remote: Total 247422 (delta 166), reused 258 (delta 154), pack-reused 247152
Receiving objects: 100% (247422/247422), 63.39 MiB | 4.65 MiB/s, done.
Resolving deltas: 100% (171185/171185), done.
Tapped 221 casks (251 files, 70.3MB).
==> Caveats
Temurin is the official successor to this software:

  brew install --cask temurin8

adoptopenjdk8 has been officially discontinued upstream.
It may stop working correctly (or at all) in recent versions of macOS.

I’m not sure if it is possible to change the homebrew dependencies to require temurin8 instead of openjdk@8 or if there is alternative workaround.

No issues accessing Scala 3 from IntelliJ on M1 MacBooks.

Regards, Mark.

Have you tried sdkman? Installation - SDKMAN! the Software Development Kit Manager

worked for me on my m1 pro

1 Like

Hey, on the M1 Mac you can use Coursier

brew install openjdk
brew install coursier/formulas/coursier
coursier install scala && coursier install scalac

then you should have scala 3.1.3 installed:

scala
Welcome to Scala 3.1.3 (17.0.1, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.

scala> 1 + 1
val res0: Int = 2

scala>