Question: Rhtslib - install error
0
gravatar for boboshaq
11 months ago by
boboshaq0
boboshaq0 wrote:

Hi!

I tried to install package: Rhtslib in my miniconda env, but I get error:

make[1]: Entering directory '/tmp/Rtmpmkgpv4/R.INSTALL78e3ccf441d/Rhtslib/src/htslib-1.7'
Makefile.Rhtslib:128: warning: overriding recipe for target '.c.o'
/cluster/bioinfo/mbon/miniconda/3/envs/R-3.5.1/lib/R/etc/Makeconf:160: warning: ignoring old recipe for target '.c.o'
x86_64-conda_cos6-linux-gnu-cc -g -Wall -O2 -I.  -c -o kfunc.o kfunc.c
x86_64-conda_cos6-linux-gnu-cc -g -Wall -O2 -I.  -c -o knetfile.o knetfile.c
x86_64-conda_cos6-linux-gnu-cc -g -Wall -O2 -I.  -c -o kstring.o kstring.c
x86_64-conda_cos6-linux-gnu-cc -g -Wall -O2 -I.  -c -o bcf_sr_sort.o bcf_sr_sort.c
x86_64-conda_cos6-linux-gnu-cc -g -Wall -O2 -I.  -c -o bgzf.o bgzf.c
In file included from bgzf.c:39:0:
htslib/bgzf.h:35:10: fatal error: zlib.h: No such file or directory
 #include <zlib.h>
          ^~~~~~~~
compilation terminated.
make[1]: *** [Makefile.Rhtslib:128: bgzf.o] Error 1
make[1]: Leaving directory '/tmp/Rtmpmkgpv4/R.INSTALL78e3ccf441d/Rhtslib/src/htslib-1.7'
make: *** [Makevars.common:21: htslib] Error 2
ERROR: compilation failed for package ‘Rhtslib’

I using Bioconductor 3.7 (BiocInstaller 1.30.0)

What I can do, to install that package?

 
error installation rhtslib zlib • 1.5k views
ADD COMMENTlink modified 22 days ago by leoadam0140 • written 11 months ago by boboshaq0
Answer: Rhtslib - install error
0
gravatar for Martin Morgan
11 months ago by
Martin Morgan ♦♦ 23k
United States
Martin Morgan ♦♦ 23k wrote:

Since you're using conda, are you installing Rhtslib using conda (rather than biocLite() / BiocManager::install() / install.packages())?

If you are using conda to install Rhtslib, then think this is ultimately a shortcoming of the conda recipe for Rhtslib, and a conda solution is required -- installing the appropriate conda container for libz. I don't know how to do that other than via google, which lead me to https://anaconda.org/anaconda/zlib

 

ADD COMMENTlink written 11 months ago by Martin Morgan ♦♦ 23k
Answer: Rhtslib - install error
0
gravatar for boboshaq
11 months ago by
boboshaq0
boboshaq0 wrote:

Hi,

I using miniconda with installed R 3.5.1. First I want to install package: methylkit:

http://bioconductor.org/packages/release/bioc/html/methylKit.html

but during installation that error will show:

In file included from bgzf.c:39:0:

htslib/bgzf.h:35:10: fatal error: zlib.h: No such file or directory

 #include <zlib.h>

          ^~~~

compilation terminated.

I tried those command:

1. BiocManager::install("methylKit", version = "3.8")

result: error shown above

2. conda install -c bioconda bioconductor-methylkit

   result error:

Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict:
  - bioconductor-methylkit -> bioconductor-fastseg -> bioconductor-biobase[version='>=2.40.0,<2.42.0'] -> bioconductor-biocgenerics[version='>=0.26.0,<0.28.0'] -> r-base[version='>=3.5.1,<3.5.2.0a0'] -> _r-mutex[version='1.*,1.*',build=anacondar_1]
  - r-microsoftr

My installed packages are:

_r-mutex                  1.0.0                     mro_2

r-microsoftr              3.5.0.108              mro351_0

r-base - non installed

biocgenerics - non installed
biobase - non installed

htslib                    1.9                  hc238db4_4    bioconda

zlib                      1.2.11               hfbfcf68_1    anaconda

 

Why methylKit installatin script do not see zlib and htslib ?

ADD COMMENTlink written 11 months ago by boboshaq0

f you were not using conda, the standard method of installation would work or would be remedied by installing libz. You are using conda, so this is a conda error and needs to be reported to them.

The Bioconductor approach is not finding libz and headers, because they are installed in a location known to conda but not to R.

ADD REPLYlink modified 11 months ago • written 11 months ago by Martin Morgan ♦♦ 23k
Answer: Rhtslib - install error
0
gravatar for jiaobingke
8 weeks ago by
jiaobingke0
jiaobingke0 wrote:

I also encountered the same error as you did. I also used miniconda to install R (for I don't have administrator permission). One of my friends help me to install Rhtslib package, and then I installed methylKit successfully. Here is the process of installing Rhtslib. Some steps maybe are not necessary, for he also tried several times.

  1. Wrote a shell script and source it.

    prefix=/yourpath/to/software/miniconda3/envs/R.3.6.0 export PATH=$prefix/bin:$PATH export MANPATH=$prefix/man:$MANPATH export LDLIBRARYPATH=$prefix/lib:$prefix/lib64:$LDLIBRARYPATH export CFLAGS="-I$prefix/include" export LDFLAGS="-L$prefix/lib"

    export CINCLUDEPATH=$CINCLUDEPATH:$prefix/include export CPLUSINCLUDEPATH=$CPLUSINCLUDEPATH:$prefix/include

  2. Download the Rhstlib package (wget https://bioconductor.org/packages/3.9/bioc/src/contrib/Rhtslib1.16.1.tar.gz ./ ) and tar -zxvf Rhtslib1.16.1.tar.gz.

  3. cd to Rhtslib. Add "-I/yourpath/to/software/miniconda3/envs/R.3.6.0/include/ -L/yourpath/to/software/miniconda3/envs/R.3.6.0/lib/" after " htslibdefaultlibs = -lz -lm -lbz2 -llzma" in several files, including Makefile.Rhtslib, Makefile. And in Makefile, add the same thing after "CC = gcc" .
  4. rm -f Rhtslib1.16.1.tar.gz. And tar -zcvf Rhtslib1.16.1.tar.gz Rhtslib
  5. Open R. Typing install.packages("Rhtslib_1.16.1.tar.gz"). Attention, this Rhtslib is the package you modified above.
  6. Rhtslib installed successfully.
  7. I typed BiocManager::install(methylKit) . plyr and ggplot2 are absent. So I installed these two packages. And again typing BiocManager::install(methylKit). The methylKit was installed successfully.
ADD COMMENTlink modified 8 weeks ago • written 8 weeks ago by jiaobingke0
Answer: Rhtslib - install error
0
gravatar for Hervé Pagès
27 days ago by
Hervé Pagès ♦♦ 14k
United States
Hervé Pagès ♦♦ 14k wrote:

Hi,

This looks like the same problem as here https://support.bioconductor.org/p/112599/ or https://support.bioconductor.org/p/124836/ A fix is in the way (in Rhtslib 1.16.2). Rhtslib 1.16.2 should become available via BiocManager::install() in the next 24h or so.

Best,

H.

ADD COMMENTlink modified 27 days ago • written 27 days ago by Hervé Pagès ♦♦ 14k

Rhtslib 1.16.2 is now available: https://bioconductor.org/packages/3.9/Rhtslib

Also please make sure that you have libbz2 + liblzma + header files on your system. On a Debian-based Linux system like Ubuntu these can be installed with sudo apt-get install libbz2-dev liblzma-dev.

Cheers,

H.

ADD REPLYlink written 22 days ago by Hervé Pagès ♦♦ 14k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 271 users visited in the last hour