`rJava` failing to load on rstudio server Version 1.2.1266

I have installed rJava without error messages using rstudio server 1.2.1266 running on ubuntu server 18.04 LTS, but when I try to load the library I get this 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 '/usr/local/lib/R/site-library/rJava/libs/rJava.so':
  libjvm.so: cannot open shared object file: No such file or directory

The strange thing is that if I load the library on R, it loads normally, I have tried matching the PATH and LD_LIBRARY_PATH environment variables of R but I still get the same error. I'm using java-11-openjdk-amd64

Any suggestion to try?

My EC2 instance auto stops/starts over night, and now is working on rstudio-server as well, apparently when you install java you have to restart your server besides doing sudo R CMD javareconf

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.