I am trying to install the package rJava
in R on Arch Linux.
I got the error:
configure: error: One or more Java configuration variables are not set.
Make sure R is configured with full Java support (including JDK). Run
R CMD javareconf as root to add Java support to R.
Running sudo R CMD javareconf
, I can see that Java headers gen.:
is not set, but I have failed to figure out how to set it.
Here is the full java configuration seen by R (beside Java haders gen.
, the rest looks ok to me):
Java interpreter : /usr/bin/java
Java version : 10
Java home path : /usr/lib/jvm/java-10-openjdk
Java compiler : /usr/bin/javac
Java headers gen.:
Java archive tool: /usr/bin/jar
I do have javah
in /usr/bin
. But how do I "tell" this to R?
javah -> /usr/lib/jvm/default/bin/javah
javah
in/usr/lib/jvm/default/bin/
. So I guess that's why R can't find it... When I was looking forjavah
withlocate
to make sure it existed, I was getting the symlink as a result. So I thought that it was fine and failed to see that it lead nowhere. Now... I am not sure where to findjavah
...javah
? This thread did not help me. And the onlyjavah
I seem to have on my machine is that symlink leading to a non existent file.