简体   繁体   中英

installing venneuler and/or rJava R package

I'm trying to install the venneuler R package on linux.

Running: install.packages("venneuler") gives this error:

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â

Trying to install the rJava package produces the same error.

So I then run R CMD javareconf as suggested and get this error:

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>

I updated java using:

sudo yum install java-1.8.0-openjdk

which completed fine but am still getting the same error trying to install venneuler

Any idea?

For rjava try installing following packages. It helped me

  • libbz2-dev
  • libpcre3-dev or libpcre2-dev
  • liblzma-dev

    sudo apt-get install packagename

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM