I have rjdbc, dbi, rjava packages installed, but when I ran below command it failed:
library(RJDBC);
Loading required package: 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 '/usr/local/lib64/R/library/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
Error: package ‘rJava’ could not be loaded
I appreciate if you could give me some insight , thanks in advance,
I actually met this error > Sys.setenv(JAVA_HOME='/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.302.b08-0.el7_9.x86_64/jre')
library(RJDBC);
Loading required package: rJava
Error: package or namespace load failed for ‘rJava’ in get(Info[i, 1], envir = env):
lazy-load database '/usr/local/lib64/R/library/rJava/R/rJava.rdb' is corrupt
Error: package ‘rJava’ could not be loaded
In addition: Warning message:
In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1