s-u / rJava

R to Java interface
https://RForge.net/rJava
235 stars 77 forks source link

Unable to install rJava package #160

Closed anilkewl closed 6 years ago

anilkewl commented 6 years ago

I am trying to install rJava package in ubuntu 16.04 version with java 8 jdk. but i am unable to install in Rstudio. I am getting this error

Error: package or namespace load failed for ‘rJava’: .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/home/anil/R/x86_64-pc-linux-gnu-library/3.4/rJava/libs/rJava.so': libjvm.so: cannot open shared object file: No such file or directory

But rJava is visible on my Rstudio package loaded files. While loading, its give this error.

I want to install RWeka in R but without rJava i could not install Rweka package.

while typing R CMD javareconf on terminal. I am getting this

Java interpreter : /usr/bin/java Java version : 1.8.0_181 Java home path : /usr/lib/jvm/java-8-openjdk-amd64/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 program 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/share/R/include -DNDEBUG -I/usr/lib/jvm/java-8-openjdk-amd64/jre/../include -I/usr/lib/jvm/java-8-openjdk-amd64/jre/../include/linux -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c conftest.c -o conftest.o g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o conftest.so conftest.o -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server -ljvm -L/usr/lib/R/lib -lR

JAVA_HOME : /usr/lib/jvm/java-8-openjdk-amd64/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/lib/R Done.

Thanks in advance.

s-u commented 6 years ago

Please contact RStudio support. RStudio is not R. Use R to install rJava.