[R] h5r package: cannot find hdf5

Dominik Schneider dosc3612 at colorado.edu
Sun Dec 18 20:06:13 CET 2016


Pedro,
I've only worked with netcdf4 but I imagine your issue is similar to one's
I've had:
I think you can:
1. add your hdf5 lib directory to the LD_LIBRARY_PATH
http://grokbase.com/t/r/r-help/10at4wcjfq/r-ncdf4-package-installation-in-r
2. you can specify the direct path to lib and include directories for the
hdf5 library:

e.g.

install.packages("/home/user/Downloads/RNetCDF_1.6.1-2.tar.gz",
repos = NULL,
type="source",
dependencies=FALSE,
configure.args="--with-netcdf-include=/usr/local/netcdf-4.2.1-build/include
--with-netcdf-lib=/usr/local/netcdf-4.2.1-build/lib")

http://stackoverflow.com/questions/11319698/how-to-install-r-packages-rnetcdf-and-ncdf-on-ubuntu


On Sat, Dec 17, 2016 at 5:09 PM, Pedro Montenegro <a67355 at gmail.com> wrote:

> I'm new to R and Linux, and I have an issue I didn't see solved on the
> internet.
>
> I'm using Ubuntu Mate and installed R version 2.11 since the current
> version does not support R-kinetics.
> What happens is that I have hdf5 headers and libraries installed
>
> $ whereis hdf5
> hdf5: /usr/include/hdf5
>
> But when I'm installing the package inside R (install.packages) or outside
> R (R CMD INSTALL) the program reports the following error:
>
> > install.packages('h5r')
> Warning in install.packages("h5r") :
>   argument 'lib' is missing: using
> '/home/pedro/R/x86_64-unknown-linux-gnu-library/2.11'
> Warning message:
> In getDependencies(pkgs, dependencies, available, lib) :
>   package ‘h5r’ is not available
> > install.packages('/home/pedro/h5r_1.4.7.tar.gz',repos=NULL,
> type='source')
> Warning in install.packages("/home/pedro/h5r_1.4.7.tar.gz", repos =
> NULL,  :
>   argument 'lib' is missing: using
> '/home/pedro/R/x86_64-unknown-linux-gnu-library/2.11'
> * installing *source* package ‘h5r’ ...
> checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
>
>
> checking for library containing inflate... -lz
> checking for library containing H5open... no
> configure: error: Can't find HDF5
> ERROR: configuration failed for package ‘h5r’
> * removing ‘/home/pedro/R/x86_64-unknown-linux-gnu-library/2.11/h5r’
> Warning message:
> In install.packages("/home/pedro/h5r_1.4.7.tar.gz", repos = NULL,  :
>   installation of package '/home/pedro/h5r_1.4.7.tar.gz' had non-zero exit
> status.
>
> I tried to reinstall HDF5, R and even the whole OS and do it all over
> again. Also tried to add the library to the environment table, do it from
> the library's directory and nothing works.
>
> Is there someone who had the same error and was able to solve it?
> Is there someone who as a clue how to solve?
>
> I'm sorry if there is a similar post around, I've seen some but I don't
> find one where the problem is solved.
> Best regards!
>
> *Pedro*
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

	[[alternative HTML version deleted]]



More information about the R-help mailing list