R won't find libR.so on its own

39 Views Asked by At

I have recently installed R v4.3.2 on a RHEL 8.7 (after removing an older v4.0.4) It has been installed using a downloaded rpm and the yum command.

however, R fails to find libR.so if I try to launch it in any way :

  • typing R in the command line.
  • launching Rstudio
  • R shiny apps

First solution tried : modifying LD_LIBRARY_PATH

If I modify LD_LIBRARY_PATH to include /opt/R/4.3.2/lib/R/lib, almost everything works : R, R-studio-server,shiny apps.

However Rscript doesn't. I assume it launches in a different shell that doesn't have LD_LIBRARY_PATH (?)

Using Rscript -S --vanilla does work (?) sometimes but then rjava doesn't load properly (does vanilla break something in the JAVA_HOME parameters?) This was getting to be a headache, so I tried something else.

Second solutions tried : fixing the path R uses

I found a similar issue on an old forum suggesting to create this conf file /etc/ld.so.conf.d/libR.conf with those two lines : /usr/lib/R/lib/ /opt/R/4.3.2/lib/R/lib

Now, I get a different error message that R cannot libRblas.so which is in the same folder.

Last solution I can think of is to reinstall from source to be sure I have the right options like shlib. I am not a sysAdmin so would welcome suggestions..

0

There are 0 best solutions below