rlinuxcentosrhdf5

How to fix 'gcc: error: "/usr/lib64/R/library/Rhdf5lib/lib/libhdf5.a": No such file or directory' in R


I am trying to install minfi in R:

BiocManager::install("minfi")

but the installation stops during the compiling of HDF5Array with the following errors:

gcc: error: "/usr/lib64/R/library/Rhdf5lib/lib/libhdf5.a": No such file or 
directory
gcc: error: "/usr/lib64/R/library/Rhdf5lib/lib/libsz.a": No such file or 
directory
make: *** [HDF5Array.so] Error 1
ERROR: compilation failed for package ‘HDF5Array’

I've already installed rhdf5 and Rhdf5lib package plus the files R "can't see" actually exist in the exact directory (/usr/lib64/R/library/Rhdf5lib/lib/) where it supposedly "searches" for them.

ls /usr/lib64/R/library/Rhdf5lib/lib/
libhdf5.a  libhdf5_cpp.a  libsz.a

My R version is 3.6.0, my GCC version is 4.8.5 20150623 (Red Hat 4.8.5-39) and my CentOS distribution is 7.6.1810

I would appreciate any suggestions.

Thank you.


Solution

  • I met the same problem. http://bioconductor.org/checkResults/release/bioc-LATEST/HDF5Array/ mentions that "HDF5Array(1.12.2)" failed to be installed. So wait for improvements.

    There is a way: installing an older version of "HDF5Array".

    url<-"https://bioconductor.org/packages/3.8/bioc/src/contrib/HDF5Array_1.10.1.tar.gz"
    install.packages(url,repos=NULL,type="source")
    BiocManager::install("minfi")