Reputation: 51
I've just downloaded and installed graalvm-ce-java11-21.3.0. By default Native Image is not available, so I need to add it. So I ran this command,
gu install native-image
I got this error:
Downloading: Release index file from oca.opensource.oracle.com
Downloading: Component catalog from www.graalvm.org
Processing Component: Native Image
Downloading: Component native-image: Native Image from github.com
Installing new component: Native Image (org.graalvm.native-image, version 21.3.0)
Installation of Native Image failed: /home/deehaz/Downloads/graalvm-ce-java11-21.3.0/lib/graal_isolate.h: Operation not permitted
I/O error occurred: /home/deehaz/Downloads/graalvm-ce-java11-21.3.0/lib/graal_isolate.h: Operation not permitted
Please, can anyone tell me how to solve this?
Upvotes: 1
Views: 1677
Reputation: 141
How to Install GraalVM Community Edition on Linux
Note: Tested on Ubuntu 20 only
$wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/graalvm-ce-java11-linux-amd64-22.0.0.2.tar.gz
$ tar -xvzf graalvm-ce-java11-linux-amd64-22.0.0.2.tar.gz
/usr/lib/jvm/
and create a symbolic link to make your life easier when updating the GraalVM version:if the jvm
folder does not exist run the command
$ mkdir /usr/lib/jvm
$ mv graalvm-ce-java11-linux-amd64-22.0.0.2/ /usr/lib/jvm/
$ cd /usr/lib/jvm
$ ln -s graalvm-ce-java11-linux-amd64-22.0.0.2 graalvm
$vim ~/.bashrc
paste the content
#gralvm configuration
export PATH=/usr/lib/jvm/graalvm/bin:$PATH
export JAVA_HOME=/usr/lib/jvm/graalvm/
reload the edited file
$ source ~/.bashrc
To make sure everything is working fine, set the new JVM on your environment:
java -version
To verify, just check the version number:
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment GraalVM CE 22.0.0.2 (build 11.0.14+9-jvmci-22.0-b05)
OpenJDK 64-Bit Server VM GraalVM CE 22.0.0.2 (build 11.0.14+9-jvmci-22.0-b05, mixed mode, sharing)
And you're set.
gu install native-image
hope i helped you..
Upvotes: 2
Reputation: 51
It seems i accidentally downloaded and extracted GraalVM installation as root and then tried to install Native Image as normal user.
Upvotes: 0