2016-10-24 117 views
0

我試圖在Linux上安裝venneulerR包。安裝venneuler和/或rJava R包

運行:install.packages("venneuler")給出了這樣的錯誤:

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 
as root to add Java support to R. 

If you don't have root privileges, run 
R CMD javareconf -e 
to set all Java-related variables and then install rJava. 

ERROR: configuration failed for package ârJavaâ 
* removing â/home/nruns/R/rJavaâ 
Warning in install.packages : 
    installation of package ârJavaâ had non-zero exit status 
ERROR: dependency ârJavaâ is not available for package âvenneulerâ 
* removing â/home/nruns/R/venneulerâ 
Warning in install.packages : 
    installation of package âvenneulerâ had non-zero exit status 

The downloaded source packages are in 
    â/tmp/RtmpjiRTHN/downloaded_packagesâ 

要安裝的rJava包產生同樣的錯誤。我更新的Java使用

trying to compile and link a JNI program 
detected JNI cpp flags : 
detected JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm 
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c conftest.c -o conftest.o 
conftest.c:1:17: fatal error: jni.h: No such file or directory 
#include <jni.h> 

所以我然後運行R CMD javareconf的建議,並得到這個錯誤

sudo yum install java-1.8.0-openjdk 

即完成不錯,但我仍然得到同樣的錯誤嘗試安裝venneuler

有什麼想法?

回答

0

對於rjava,請嘗試安裝以下軟件包。它幫助我

  • libbz2-dev的
  • libpcre3-dev的或libpcre2-dev的
  • liblzma-dev的

    sudo apt-get install packagename