1

I am trying to install scala in MacBook with M1 chips. I have had Zulus javaJDK 15.0.2 installed. I have previously used this page to install home-brew: Getting a warning when installing homebrew on MacOS Big Sur (M1 chip)

But when installing scala by brew install scala, I get the following message:

Error: Failed applying an ad-hoc signature to /opt/homebrew/Cellar/openjdk/15.0.1/libexec/openjdk.jdk/Contents/MacOS/libjli.dylib: /opt/homebrew/Cellar/openjdk/15.0.1/libexec/openjdk.jdk/Contents/MacOS/libjli.dylib: replacing existing signature /opt/homebrew/Cellar/openjdk/15.0.1/libexec/openjdk.jdk/Contents/MacOS/libjli.dylib: resource fork, Finder information, or similar detritus not allowed

==> Caveats ... ... If you need to have openjdk first in your PATH, run: echo 'export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"' >> ~/.zshrc

For compilers to find openjdk you may need to set: export CPPFLAGS="-I/opt/homebrew/opt/openjdk/include"

For the system Java wrappers to find this JDK, symlink it with sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk

enter image description here

Despite of this message, I can already run scala script from vscode. So should I worry about the path issue in the message above ? Thanks !

uru
  • 41
  • 1
  • 3
  • Hi, welcome to Stack Overflow. A hint for the future: when asking a question, never use a screen shot, unless your question is about a GUI. Always paste in text. Text is searchable, screen shots aren't. The purpose of Stack Overflow isn't just to get your question answered, it's to accumulate searchable questions and answers, because that helps everyone and makes the world better. – Seth Tisue Mar 04 '21 at 03:27
  • 2
    Sorry for inconvenience caused, I will pay attention to it next time. But I have lost the terminal with the message, and I have just noted some lines. I have added them to the description. Thanks. – uru Mar 06 '21 at 21:12

1 Answers1

16

I successfully installed it using SDKMAN so that is worth a try.

curl -s "https://get.sdkman.io" | bash

Start a new shell or source "$HOME/.sdkman/bin/sdkman-init.sh"

sdk install java
sdk install sbt
sbt compile

Really fast on an M1 with 16GB RAM :)

Tim
  • 26,753
  • 2
  • 16
  • 29