rJava不会安装在openSUSE 13.2上

时间:2015-02-23 06:19:37

标签: java r opensuse rjava

我试图在全新安装的openSUSE 13.2上安装rJava。 JRE和JDK都已安装。当使用install.packages()它实际上工作正常并编译一些东西,但然后我得到的第一个错误消息是这些:

mp  -L/usr/lib64/R/lib -lR -lrt -ldl -lm -licuuc -licui18n
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -licuuc
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -licui18n
collect2: error: ld returned 1 exit status
Makefile.all:38: recipe for target 'libjri.so' failed
make[2]: *** [libjri.so] Error 1
make[2]: Leaving directory '/tmp/RtmpmK9cz2/R.INSTALL48f8aa9a7b5/rJava/jri/src'
Makefile.all:21: recipe for target 'src/JRI.jar' failed
make[1]: *** [src/JRI.jar] Error 2
make[1]: Leaving directory '/tmp/RtmpmK9cz2/R.INSTALL48f8aa9a7b5/rJava/jri'
Makevars:14: recipe for target 'jri' failed
make: *** [jri] Error 2
ERROR: compilation failed for package ‘rJava’

正在运行R CMD javareconf给我这个:

Java interpreter : /usr/bin/java
Java version     : 1.8.0_40
Java home path   : /usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/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 progam 
detected JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
detected JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
gcc -std=gnu99 -I/usr/lib64/R/include -DNDEBUG -I/usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/jre/../include -I/usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/jre/../include/linux -I/usr/local/include    -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g  -c conftest.c -o conftest.o
gcc -std=gnu99 -shared -L/usr/local/lib64 -o conftest.so conftest.o -L/usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/jre/lib/amd64/server -ljvm -L/usr/lib64/R/lib -lR


JAVA_HOME        : /usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/jre
Java library path: $(JAVA_HOME)/lib/amd64/server
JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
Updating Java configuration in /usr/lib64/R
Done.

我甚至不确定这是一个Java问题。关于出了什么问题的任何想法?

1 个答案:

答案 0 :(得分:4)

原来问题是libicu-devel包丢失了。安装它解决了这个问题。