Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rJava missing library issue. #133

Open
mxshiv opened this issue Apr 12, 2023 · 0 comments
Open

rJava missing library issue. #133

mxshiv opened this issue Apr 12, 2023 · 0 comments

Comments

@mxshiv
Copy link

mxshiv commented Apr 12, 2023

While trying to load rJava from the Workbench IDE, it complains of missing library. I have already installed the pre-requisite Linux rpms but the issue persists. Can you please suggest? Many thanks.

====================================================================
Error:

library("rJava")
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/mxshiv/R/x86_64-pc-linux-gnu-library/4.2/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
packageVersion("rJava")
[1] ‘1.0.6’

======================================

Package Details:

rpm -qa| egrep "make|java-1.8.0-openjdk-devel"

automake-1.16.1-7.el8.noarch
make-4.2.1-11.el8.x86_64
cmake-filesystem-3.20.2-4.el8.x86_64
texlive-makecmds-20180414-25.el8.noarch
java-1.8.0-openjdk-devel-1.8.0.345.b01-5.el8.x86_64
texlive-makeindex-20180414-25.el8.x86_64

R CMD javareconf

Java interpreter : /usr/bin/java
Java version : 1.8.0_345
Java home path : /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.345.b01-5.el8.x86_64/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 -I"/opt/R/4.2.1/lib/R/include" -DNDEBUG -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.345.b01-5.el8.x86_64/jre/../include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.345.b01-5.el8.x86_64/jre/../include/linux -I/usr/local/include -fpic -g -O2 -c conftest.c -o conftest.o
gcc -shared -L/opt/R/4.2.1/lib/R/lib -L/usr/local/lib -o conftest.so conftest.o -L/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.345.b01-5.el8.x86_64/jre/lib/amd64/server -ljvm -L/opt/R/4.2.1/lib/R/lib -lR

JAVA_HOME : /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.345.b01-5.el8.x86_64/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 /opt/R/4.2.1/lib/R
Done.

locate libjvm.so

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.345.b01-5.el8.x86_64/jre/lib/amd64/server/libjvm.so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant