Off topic:Problem to install "rJava" in R.
0
0
Entering edit mode
8.3 years ago
unique379 ▴ 90

Dear all,

I am trying to install "rJava" into R but getting following errors. OS= centOS; R version = R-3.2.3

checking Java support in R... present:
interpreter : '/usr/bin/java'
archiver    : '/usr/bin/jar'
compiler    : '/usr/bin/javac'
header prep.: '/usr/bin/javah'
cpp flags   : ''
java libs   : ''
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

Then I tried with

locate jni.h
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.95-2.6.4.0.el7_2.x86_64/include/jni.h

and run

[root@localhost ~]# R CMD javareconf
Java interpreter : /usr/bin/java
Java version     : 1.8.0_71
Java home path   : /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-2.b15.el7_2.x86_64/jre
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI program
detected JNI cpp flags    :
detected JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
gcc -std=gnu99 -I/usr/SoftwareDownload/R-3.2.3/include -DNDEBUG  -I/usr/local/include -fpic  -g -O2  -c conftest.c -o conftest.o
conftest.c:1:17: fatal error: jni.h: No such file or directory
 #include <jni.h>
                 ^
compilation terminated.
make: *** [conftest.o] Error 1
Unable to compile a JNI program

JAVA_HOME        : /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-2.b15.el7_2.x86_64/jre
Java library path:
JNI cpp flags    :
JNI linker flags :
Updating Java configuration in /usr/SoftwareDownload/R-3.2.3
Done.
R shell bash • 5.1k views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 1426 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6