If you're trying to run GraalVM on MacOS Big Sur it is likely you've seen an error message that tells you that it is damaged. I ran into this today and luckily stumbled across the Github issue that contains the fix.
The GraalVM folks noticed this a put it on the download page, but I missed it there.
To install and get everything running properly do the following:
- Download GraalVM from here - https://github.com/graalvm/graalvm-ce-builds/releases
- Version 20.3.0 for MacOS is here - https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.3.0/graalvm-ce-java11-darwin-amd64-20.3.0.tar.gz
Then move GraalVM into your virtual machines directory:
sudo mv graalvm-ce-java11-20.3.0/ /Library/Java/JavaVirtualMachines/
Add the necessary GraalVM environment variables (change 20.3.0
to your version if it is different):
export PATH=/Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.3.0/Contents/Home/bin:"$PATH"
export JAVA_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.3.0/Contents/Home
At this point if you try to run a command like gu
you'll probably get the error message about the download being broken. When that happens you can do this:
sudo xattr -r -d com.apple.quarantine /Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.3.0/
Try running gu
again and you should be all set.