-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] setup $PATH for root user #40
Comments
Hello @fkjaekel , I understand your problem. I run always into the same problem and fix it manually. I think the Java 21 feature is more important for you. So I will work on this one first |
Hi @fkjaekel , |
Hello @fkjaekel , what can I do: or add the GRAALVM_HOME variable to the .bashrc of root and then add it to the path like this:
Both solution would not help in your case. and only when you switch to root completly. let me demonstrate this for # switch to root user explicitly
arl@fedora ~ $ sudo su -
[root@fedora ~]# java --version
openjdk 21 2023-09-19
OpenJDK Runtime Environment GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15)
OpenJDK 64-Bit Server VM GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15, mixed mode, sharing)
[root@fedora ~]# which java
/root/.local/bin/java
[root@fedora ~]# exit
logout
arl@fedora ~ $ sudo java --version
openjdk 17.0.8 2023-07-18
OpenJDK Runtime Environment (Red_Hat-17.0.8.0.7-1.fc37) (build 17.0.8+7)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.8.0.7-1.fc37) (build 17.0.8+7, mixed mode, sharing)
arl@fedora ~ $ sudo which java
/usr/bin/java
arl@fedora ~ $ sudo ls -la /usr/bin/java
lrwxrwxrwx. 1 root root 22 Sep 4 07:45 /usr/bin/java -> /etc/alternatives/java What I don't want to interfere with the java alternatives A simple workaround for you could be # here I switched my graalvm to 17.0.8
# the GRAALVM_HOME Variable is set in normal circumstances
arl@fedora ~ $ sudo $GRAALVM_HOME/bin/gu --version
GraalVM Updater 23.0.1 I'm waiting for your feedback |
Hi, Option 1 sounds fine. Since native-image is now included, I currently don't have other components to install after the GraalVM setup. Thanks |
Using the role with the default variable values, ansible playbook running with become=true
Trying to run as root:
The text was updated successfully, but these errors were encountered: