While installing the R package “hdf5r“ version 1.3.3, I encountered the error:
1 | fatal error: hdf5.h: No such file or directory |
My OS is Debian buster/10.6, and the package “libhdf5-dev” has been installed. It looks R cannot find the path of hdf5 header and library files.
It has been resolved by:
1. Export environment variables for header files
1 | export C_INCLUDE_PATH=/usr/include/hdf5/serial/:$C_INCLUDE_PATH |
2. Create symbolic links for library files
1 | cd /usr/lib/x86_64-linux-gnu/ |
3. Install package “hdf5r”
1 | install.packages("hdf5r") |
Now there would be OK.