我不能调用rJava包在R 3.0。我收到以下消息
原文链接:https://www.f2er.com/ubuntu/351749.htmlError: 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安装r-cran-rjava这是没有帮助解决这个问题。关于jni.h有一些解决方案here.但是,不知道我该如何使用解决方案。