Trouble installing Bioconductor packages inside a conda environment.
0
0
Entering edit mode
2.5 years ago
TonyCN ▴ 60

I would appreciate some assistance resolving Bioconductor R package installation problems within a conda environment.

I have an Ubuntu machine with three accounts: root, user 1 with sudo privileges and part of group 1001, and user 2 also part of group 1001. This machine has a fresh installation of Ubuntu, please don't presume I have all the necessary dependencies.

As sudo, user 1 (me) installed Anaconda, which then becomes executable by user 2. Then user 2 set up a conda environment and install R-base and R-essentials. They then access R from the terminal and begin the process of installing Bioconductor's biocmanager. All is going well until they try to install any of the R bioconductor packages. For example,

BiocManager::install("missMethyl")

Throws up several errors. Here are a collection of them:

cp: cannot stat 'hdf5/c++/src/.libs/libhdf5_cpp.a': No such file or directory
make: *** [Makevars:36: copying] Error 1
ERROR: compilation failed for package ‘Rhdf5lib’

........

Using libxml2.*
checking for gzopen in -lz... yes
checking for xmlParseFile in -lxml2... no
checking for xmlParseFile in -lxml... no
configure: error: "libxml not found"
ERROR: configuration failed for package ‘XML’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/XML’
ERROR: dependency ‘XML’ is not available for package ‘rtracklayer’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/rtracklayer’
ERROR: dependency ‘XML’ is not available for package ‘biomaRt’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/biomaRt’
ERROR: dependency ‘Rhdf5lib’ is not available for package ‘rhdf5’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/rhdf5’
ERROR: dependency ‘XML’ is not available for package ‘annotate’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/annotate’
ERROR: dependencies ‘rtracklayer’, ‘biomaRt’ are not available for package ‘GenomicFeatures’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/GenomicFeatures’
ERROR: dependency ‘annotate’ is not available for package ‘genefilter’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/genefilter’
ERROR: dependencies ‘rhdf5’, ‘Rhdf5lib’ are not available for package ‘HDF5Array’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/HDF5Array’
ERROR: dependency ‘GenomicFeatures’ is not available for package ‘TxDb.Hsapiens.UCSC.hg19.knownGene’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/TxDb.Hsapiens.UCSC.hg19.knownGene’
ERROR: dependency ‘GenomicFeatures’ is not available for package ‘bumphunter’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/bumphunter’
ERROR: dependency ‘HDF5Array’ is not available for package ‘DelayedMatrixStats’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/DelayedMatrixStats’
ERROR: dependencies ‘GenomicFeatures’, ‘TxDb.Hsapiens.UCSC.hg19.knownGene’ are not available for package ‘FDb.InfiniumMethylation.hg19’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/FDb.InfiniumMethylation.hg19’
ERROR: dependencies ‘bumphunter’, ‘DelayedMatrixStats’, ‘genefilter’, ‘HDF5Array’ are not available for package ‘minfi’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/minfi’
ERROR: dependencies ‘FDb.InfiniumMethylation.hg19’, ‘minfi’, ‘annotate’, ‘genefilter’ are not available for package ‘methylumi’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/methylumi’
ERROR: dependency ‘minfi’ is not available for package ‘IlluminaHumanMethylation450kmanifest’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/IlluminaHumanMethylation450kmanifest’
ERROR: dependency ‘minfi’ is not available for package ‘IlluminaHumanMethylation450kanno.ilmn12.hg19’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/IlluminaHumanMethylation450kanno.ilmn12.hg19’
ERROR: dependency ‘minfi’ is not available for package ‘IlluminaHumanMethylationEPICmanifest’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/IlluminaHumanMethylationEPICmanifest’
ERROR: dependency ‘minfi’ is not available for package ‘IlluminaHumanMethylationEPICanno.ilm10b4.hg19’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/IlluminaHumanMethylationEPICanno.ilm10b4.hg19’
ERROR: dependencies ‘minfi’, ‘methylumi’, ‘IlluminaHumanMethylation450kmanifest’, ‘IlluminaHumanMethylation450kanno.ilmn12.hg19’, ‘IlluminaHumanMethylationEPICmanifest’, ‘IlluminaHumanMethylationEPICanno.ilm10b4.hg19’ are not available for package ‘missMethyl’
* removing ‘/home/npaudel/.conda/envs/r_env/lib/R/library/missMethyl’

......

make[3]: Entering directory '/tmp/RtmpnsAIx5/R.INSTALL3753b2ffeadb1/Rhdf5lib/src/hdf5/c++/src'
  CXX      H5Exception.lo
  CXX      H5IdComponent.lo
  CXX      H5DataSpace.lo
H5DataSpace.cpp:15:10: fatal error: iostream.h: No such file or directory
 #include <iostream.h>
          ^~~~~~~~~~~~
compilation terminated.

I have a feeling HDF5 might be an issue so here's the Summary Information during the failed attempt at installing missMethyl:

        *SUMMARY OF THE HDF5 CONFIGURATION
        =================================
General Information:
-------------------
                   HDF5 Version: 1.10.5
                  Configured on: Wed Nov  3 18:12:21 GMT 2021
                  Configured by: npaudel@anthony-desktop
                    Host system: x86_64-unknown-linux-gnu
              Uname information: Linux anthony-desktop 5.11.0-37-generic #41~20.04.2-Ubuntu SMP Fri Sep 24 09:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
                       Byte sex: little-endian
             Installation point: /tmp/RtmpnsAIx5/R.INSTALL3753b2ffeadb1/Rhdf5lib/src/hdf5/hdf5
Compiling Options:
------------------
                     Build Mode: production
              Debugging Symbols: no
                        Asserts: no
                      Profiling: no
             Optimization Level: high
Linking Options:
----------------
                      Libraries: static
  Statically Linked Executables: 
                        LDFLAGS: -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/home/npaudel/.conda/envs/r_env/lib -Wl,-rpath-link,/home/npaudel/.conda/envs/r_env/lib -L/home/npaudel/.conda/envs/r_env/lib
                     H5_LDFLAGS: 
                     AM_LDFLAGS:  -L/tmp/RtmpnsAIx5/R.INSTALL3753b2ffeadb1/Rhdf5lib/src/hdf5/szip/szip/lib
                Extra libraries: -lrt -lsz -lz -ldl -lm 
                       Archiver: /home/npaudel/.conda/envs/r_env/bin/x86_64-conda_cos6-linux-gnu-ar
                       AR_FLAGS: cr
                         Ranlib: /home/npaudel/.conda/envs/r_env/bin/x86_64-conda_cos6-linux-gnu-ranlib
Languages:
----------
                              C: yes
                     C Compiler: /home/npaudel/.conda/envs/r_env/bin/x86_64-conda_cos6-linux-gnu-cc
                       CPPFLAGS: -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/npaudel/.conda/envs/r_env/include
                    H5_CPPFLAGS: -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L   -DNDEBUG -UH5_DEBUG_API
                    AM_CPPFLAGS:  -I/tmp/RtmpnsAIx5/R.INSTALL3753b2ffeadb1/Rhdf5lib/src/hdf5/szip/szip/include
                        C Flags: -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/npaudel/.conda/envs/r_env/include -fdebug-prefix-map=/tmp/build/80754af9/r-base_1589917437985/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/home/npaudel/.conda/envs/r_env=/usr/local/src/conda-prefix -w -fpic
                     H5 C Flags:  -std=c99  -pedantic -Wall -Wextra -Wbad-function-cast -Wc++-compat -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-equal -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wunused-macros -Wunsafe-loop-optimizations -Wwrite-strings -finline-functions -s -Wno-inline -Wno-aggregate-return -Wno-missing-format-attribute -Wno-missing-noreturn -O
                     AM C Flags: 
               Shared C Library: no
               Static C Library: yes
                        Fortran: no
                            C++: yes
                   C++ Compiler: /home/npaudel/.conda/envs/r_env/bin/x86_64-conda_cos6-linux-gnu-c++ -std=gnu++11
                      C++ Flags: -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/npaudel/.conda/envs/r_env/include -fdebug-prefix-map=/tmp/build/80754af9/r-base_1589917437985/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/home/npaudel/.conda/envs/r_env=/usr/local/src/conda-prefix -w -fpic
                   H5 C++ Flags:   -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wredundant-decls -Winline -Wsign-promo -Woverloaded-virtual -Wold-style-cast -Weffc++ -Wreorder -Wnon-virtual-dtor -Wctor-dtor-privacy -Wabi -finline-functions -s -O
                   AM C++ Flags:  -DOLD_HEADER_FILENAME -DHDF_NO_NAMESPACE -DNO_STATIC_CAST
             Shared C++ Library: no
             Static C++ Library: yes
                           Java: no
Features:
---------
                   Parallel HDF5: no
Parallel Filtered Dataset Writes: no
              Large Parallel I/O: no
              High-level library: yes
                    Threadsafety: no
             Default API mapping: v110
  With deprecated public symbols: yes
          I/O filters (external): deflate(zlib),szip(encoder)
                             MPE: no
                      Direct VFD: no
                         dmalloc: no
  Packages w/ extra debug output: none
                     API tracing: no
            Using memory checker: no
 Memory allocation sanity checks: no
          Function stack tracing: no
       Strict file format checks: no
    Optimization instrumentation: no*

Thanks.

anacona conda R bioconductor • 3.3k views
ADD COMMENT
1
Entering edit mode

If you're using conda to manage an R environment (which I do not recommend for your main R environment), do not install packages from within R. Instead, use conda and bioconductor-* conda packages from the bioconda channel. Package managers do not play well together, and R's internal package manager/conda are no exception.

I personally prefer to install and manage my principal R installation outside all package managers - no homebrew, no conda. I use conda to only set up specific environments on demand, such as an R 3.4.1 env, one for cnvs/bams (with Rsamtools & copywriteR) or paper-specific environments so I can flash-freeze a setup.

ADD REPLY
0
Entering edit mode

You seem to be missing libxml. Since you have sudo privileges you can install (libxml-dev) outside of conda.

ADD REPLY

Login before adding your answer.

Traffic: 1960 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