I am trying to install RWeka
package in R 3.3.0:
* installing *source* package ‘RWeka’ ...
** package ‘RWeka’ successfully unpacked and MD5 sums checked
Need at least Java version 1.7/7.0.
ERROR: configuration failed for package ‘RWeka’
However, I have Java 1.8, so it should be fine. Curiously, I was able to install RWekajars
which should have similar Java dependencies.
To confirm Java on the command line:
$ java -version
openjdk version "1.8.0_121"
Then in R:
> library(rJava)
> .jinit()
> .jcall("java/lang/System", "S", "getProperty", "java.runtime.version")
[1] "1.8.0_121-b13"
Why does RWeka
think I do not meet the Java requirement?
I looked at $LD_LIBRARY_PATH/R/etc/Makeconf
and JAVA_HOME
there was set to 1.6. Therefore, R thinks that Java is 1.6 even though 1.8 is loaded.
This can be fixed by running:
R CMD javareconf
That requires root privileges.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.