![](/img/trans.png)
[英]GraalVM (native-image) can not compile logback dependencies
[英]Can't install Graalvm native-image on ubuntu 20.04.3 LTS
我剛剛下載並安裝了 graalvm-ce-java11-21.3.0。 默認情況下 Native Image 是不可用的,所以我需要添加它。 所以我運行了這個命令,
gu install native-image
我收到此錯誤:
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
拜托,誰能告訴我如何解決這個問題?
如何在Linux上安裝GraalVM社區版
注意:僅在 Ubuntu 20 上測試
$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/
並創建一個符號鏈接,讓您在更新 GraalVM 版本時更輕松: 如果jvm
文件夾不存在運行命令
$ 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
粘貼內容
#gralvm configuration
export PATH=/usr/lib/jvm/graalvm/bin:$PATH
export JAVA_HOME=/usr/lib/jvm/graalvm/
重新加載編輯后的文件
$ source ~/.bashrc
為確保一切正常,請在您的環境中設置新的 JVM:
java -version
要驗證,只需檢查版本號:
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)
你准備好了。
gu install native-image
希望我幫助了你..
看來我不小心以 root 身份下載並提取了 GraalVM 安裝,然后嘗試以普通用戶身份安裝 Native Image。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.