Error while installing hdf5 via BiocManager
1
0
Entering edit mode
biok0423 ▴ 20
@biok0423-23341
Last seen 4.1 years ago

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.

software error • 4.7k views
ADD COMMENT
0
Entering edit mode
Mike Smith ★ 6.5k
@mike-smith
Last seen 5 hours ago
EMBL Heidelberg

There's a lot going on here and I'm not really sure where to start. This is just a collection of thoughts, what order you might want to look at them is up to you.


You're using a pretty old version of R, and in Bioconductor packages are tied to version of R, so I'd recommend updating to the latest R. We're currently on R-3.6.3 and R-4.0.0 will be out in a few weeks.


There's no package called hdf5, which is why you get the package ‘hdf5’ is not available (for R version 3.5.1) error. You need to get the name correct, otherwise nothing will be installed.

There's a package called rhdf5 in Bioconductor and hdf5r in CRAN. This is the place to ask for help with Bioconductor packages, but not for CRAN packages.


If you're using R installed via conda then I recommend installing the packages with conda too, rather than using install.packages() or BiocManager::install()

The same applies for installing system libraries like libcurl. It looks like you've done that in your last set of instructions.

ADD COMMENT
0
Entering edit mode

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:

>library(rhdf5)

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.

ADD REPLY
2
Entering edit mode

Mike

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:

> BiocManager::install('rhdf5')
> install.packages("hdf5r")

This worked after installing libhdf5-dev with following command:

sudo apt-get install libhdf5-dev

I thought if I installed this packages, I could open .h5 file, but still I got error saying:

> so <- sleuth_prep(s2c, target_mapping = t2g, num_cores = 1)
reading in kallisto results
dropping unused factor levels
.. H5Fopen(file, "H5F_ACC_RDONLY", native = native) error:

I am not sure what to do next.

HDF5. File accessibilty. Unable to open file.

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 499 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6