Closed mangelett closed 4 months ago
Since R also uses the R_HOME
environment variable, can you try setting it via Julia Preferences instead of environment variables? This is a new feature, but it might help here. Then you wouldn't need to set R_HOME
and LD_LIBRARY_PATH
.
Hi,
I defined the file LocalPreferences.toml in /softs/julia/julia-1.8.5/environnement/v1.8 and define in the file Rhome and Rlib.
In julia, when I try using RCall
it fails with:
ERROR: could not load library "/softs/R/R-4.4.0/lib64/R/lib/libR.so"
libRblas.so: cannot open shared object file: No such file or directory
ERROR: InitError: Try adding /softs/R/R-4.4.0/lib64/R/lib to the "LD_LIBRARY_PATH" environmental variable and restarting Julia.
But when I quit julia and export the path in LD_LIBRARY_PATH with export LD_LIBRARY_PATH=/softs/R/R-4.4.0/lib64/R/lib/:$LD_LIBRARY_PATH
, the julia command using RCall
succeed and the examples given in https://juliainterop.github.io/RCall.jl/stable/gettingstarted/ work.
So thank you: i can solve the issue by adding the R library in the path.
Hi,
I'm trying to call RCall in Julia 1.8.5 but it fails with the following error:
The operating system is Rocky Linux 8.6. Julia is installed on the folder /softs/julia/julia-1.8.5 and R is installed on the folder /softs/R/R-4.2.2. Before installing RCall in Julia, I define the following environment variables:
Then in Julia, I launch:
The building of RCall seems to work but I can't use it. Renviron is currently in the folder /softs/R/R-4.2.2/lib64/R/etc/. I tried to add this folder to the LD_LIBRARY_PATH variable or to the PATH variable but it doesn't solve the problem. I also give the largest rights to the file Renviron (chmod 777). But it doesn't solve the issue.
Here is the result of versioninfo() in julia if it helps: