I have tried to install hdf5 via BiocManager::install() using ubuntu 18.04. I think I need this package to read .h5 file. Info on my R is here:
$ R
R version 3.5.1 (2018-07-02) -- "Feather Spray"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Here is an error I got.
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
* deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
* rpm: libcurl-devel (Fedora, CentOS, RHEL)
* csw: libcurl_dev (Solaris)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘curl’
1: package ‘hdf5’ is not available (for R version 3.5.1)
2: install.packages(update[instlib == l, "Package"], l, contriburl = contriburl, :
installation of package ‘curl’ had non-zero exit status
Here is what I tried.
$ sudo dpkg -i libcurl4-openssl-dev_7.58.0-2ubuntu3.8_amd64.deb
$ export PKG_CONFIG_PATH=/usr/lib/pkgconfig
Now I think libcurl.pc file is located in the PATH(/usr/lib/pkgconfig) as shown here:
/usr/lib/pkgconfig$ ls
ibus-table.pc libR.pc libcurl.pc
Also I tried to update some packages shown here:
$ conda install -c r r-curl
$ conda install -c conda-forge/label/cf202003 r-hdf5r
$ conda install -c conda-forge libcurl
All process seemed to go successfully so I have the latest version for these packages.
I did not try the following command because I dont know what I should put in the ... part.
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
I know many people are facing the same error and I have checked them, but I cannot still fix my error. Please kindly give me some advice.
Many thanks for your answer. And I was wrong to spell the package name. Now I can install `rhdf5'. Sorry for my simple error, I am quite new in R and informatics field.
Still I got error about curl and libcurl, but I don`t see any error when running the following command:
So I think it worked. Also thank you for the advice on version of R. I guess the remaining error may come from the old version. Would you recommend to update R version to the latest one? I am not sure what to do after updating the version.
Please let me update what happened. You are right that updated version worked well. I found version of Rstudio is 3.6.3-1bionic and I tried to install both packages with following command:
This worked after installing libhdf5-dev with following command:
I thought if I installed this packages, I could open .h5 file, but still I got error saying:
I am not sure what to do next.
HDF5. File accessibilty. Unable to open file.
This ultimate looks like you're trying to use the sleuth package, and the error is coming from that software.
Sleuth isn't a Bioconductor package, so it's unlikely that people on this forum can provide the best help. I would suggest contacting the Sleuth team directly be creating an issue on their Github page at https://github.com/pachterlab/sleuth/issues