我无法rJava
在R 3.0
. 我收到以下消息
Error: package ‘rJava’ was built before R 3.0.0: please re-install it
尝试重新安装rJava
软件包时出现错误。我提供了输出R CMD javareconf
Java interpreter : /usr/bin/java
Java version : 1.7.0_21
Java home path : /usr/lib/jvm/java-7-openjdk-i386/jre
Java compiler : /usr/lib/jvm/java-7-openjdk-i386/jre/../bin/javac
Java headers gen.: /usr/lib/jvm/java-7-openjdk-i386/jre/../bin/javah
Java archive tool: /usr/lib/jvm/java-7-openjdk-i386/jre/../bin/jar
trying to compile and link a JNI progam
detected JNI cpp flags :
detected JNI linker flags :
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -O2 -pipe -g -c conftest.c -o conftest.o
conftest.c:1:17: fatal error: jni.h: No such file or directory
compilation terminated.
make: *** [conftest.o] Error 1
Unable to compile a JNI program
Java library path:
JNI cpp flags :
JNI linker flags :
Updating Java configuration in /usr/lib/R
Done.
我正在使用 Ubuntu 13.04。我也试过apt-get install r-cran-rjava
这无助于解决问题。关于 jni.h 这里有一些解决方案。但是,不知道如何在这里使用该解决方案。