Java package error on RStudio

I am running a R package that includes Java code, and I am getting the following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /spack/2206/apps/linux-centos7-x86_64_v3/gcc-11.3.0/openjdk-11.0.15_10-62tcbpi/lib/ cannot open shared object file: No such file or directory

I have installed all of these packages (using module load), but the error persists: gcc/11.3.0 libx11 libxt libxtst/1.2.2 libxrender libxext openblas libgdal-dev libgeos-dev libproj-dev sqlite3 libxext6 jdk

How do I get this installed, and how do I know which package it would be in?

On the RStudio Server form page, try adding libxext to the “Additional modules to load” field.

I added libxext this way, however, the error is still occurring. I also tried loading using the terminal, to no avail.


Some of the module names you have listed do not exist, so I think it fails to load all of them. Try the following set:

libx11 libxt libxtst libxrender libxext

Some other modules like gdal and proj are already loaded for the RStudio Server app. Check the log files for the session to see the list of loaded modules.

You could also try installing R and R packages in a Conda environment instead of using the modules.

I didn’t know that they all fail to load; thank you! It is working now.