Problem with hdf5r finding libhdf5_hl.so.100 file - r

I'm trying to correctly load the R package hdf5r, well actually I want to use a dependency of hdf5r, but I'm running into problems with the hdf5r package. I've installed the hdf5r package, and no errors occurred during the installation. But when I load the package I get the following error:
> library(hdf5r)
Error: package or namespace load failed for ‘hdf5r’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/lib64/R/library/hdf5r/libs/hdf5r.so':
libhdf5_hl.so.100: cannot open shared object file: No such file or directory
I have checked that both
/usr/lib64/R/library/hdf5r/libs/hdf5r.so and the libhdf5_hl.so.100 files are present on my system. I installed the hdf5 package from source into /usr/local and have added the path /usr/local/lib to the LD_LIBRARY_PATH variable in my /usr/lib64/R/etc/Renviron file
> Sys.getenv("LD_LIBRARY_PATH")
[1] "/usr/local/lib"
I am on a RedHat 7 machine.

I had the same problem, hdf5r can be loaded in the teminal R, however, it can't be loaded in the rstudio-server.
load the lib manully in r before load the hdf5r package
dyn.load('<your hdf5r lib path>/libhdf5_hl.so.100')
library(hdf5r)

Related

Issue with the installation of terra package in R

I am using RRstudio 4.2.1 and I am trying to install the terra package.
Unfortunately, I get following error that I don't understand
Error: package or namespace load failed for ‘terra’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object 'my_path_here/R/x86_64-pc-linux-gnu-library/4.2/terra/libs/terra.so':
libproj.so.25: cannot open shared object file: No such file or directory
I haven't came across this error again, so I would like some help!
P.S when I am trying installing it from the terminal, I get the following in the middle of installation :./proj_conf_test: error while loading shared libraries: libproj.so.25: cannot open shared object file: No such file or directory
Thanks!

Unable to load R package gsl: libgsl.so.25: cannot open shared object file: No such file or directory

My R version is 4.1.2. It seems that I successfully install gsl package, but when I run library(gsl), I get following error:
Error: package or namespace load failed for ‘energy’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/public/home/username/localR/lib64/R/library/gsl/libs/gsl.so':
libgsl.so.25: cannot open shared object file: No such file or directory
Only this package has the error above. Meanwhile, when I try to use the packages related to it(e.x. energy), R will occur the same error. However, other packages are not affected.
Thanks.

libgsl.so.25: cannot open shared object file: No such file or directory

while installing DirichletMultinomial, in r studio found this error:-
Error: package or namespace load failed for ‘DirichletMultinomial’ in
dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object
'/home/hpi7/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-DirichletMultinomial/00new/DirichletMultinomial/libs/DirichletMultinomial.so':
libgsl.so.25: cannot open shared object file: No such file or
directory Error: loading failed
Depending of the OS you are using, you will need first to install the library GNU Scientific Library (GSL) (the development package).
On my Linux Mint machine, it is:
sudo apt-get install libgsl-dev
Then, you can install the package:
BiocManager::install("DirichletMultinomial")

Why does installed "igraph" package return "libicui18n.so.58: cannot open shared object file"after loading?

I was trying to install the package igraph in R using the command install.packages("igraph"). After the installation, during testing phase it showed the following error:
testing if installed package can be loaded Error: package or namespace
load failed for ‘igraph’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object
'/home/midhun/R/x86_64-redhat-linux-gnu-library/3.5/igraph/libs/igraph.so':
libicui18n.so.58: cannot open shared object file: No such file or
directory Error: loading failed Execution halted ERROR: loading
failed
removing ‘/home/midhun/R/x86_64-redhat-linux-gnu-library/3.5/igraph’
The downloaded source packages are in
‘/tmp/RtmpLVDism/downloaded_packages’ Warning message: In
install.packages("igraph") : installation of package ‘igraph’ had
non-zero exit status
Why this is happening? What could be a solution?
The library igraph requires library files such as:
libicui18n.so.58, libicuuc.so.58, libgfortran, etc.
These were either not installed in the proper library folder or were existing as previous versions. For example, in my case, libicuuc.so.58 was required to be installed in usr/lib64. Make sure that dependencies are installed correctly to solve such problems.

Loading Rstudio packages in unix/cluster to use in a global rstudio platform

I am trying to load in specific the package ncdf4 into a global Rstudio platform by running commands on the cluster(unix).
Usually the way to operate is to go for:
load module R
load module netcdf
although I've tried several versions of the modules, i still cannot access the ncdf4 package using the global Rstudio.
here is a copy of the error text:
> library (ncdf4)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/cm/shared/apps/R/3.2.4/lib64/R/library/ncdf4/libs/ncdf4.so':
libnetcdf.so.7: cannot open shared object file: No such file or directory
Error: package or namespace load failed for ‘ncdf4’
Any tips in reasoning, procedure or application will be highly appreciated.
I already tried logging in and out from R but it is still not working

Resources