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.