Can't install package 'DiffBind'

Hi,
I am trying to install DiffBind (https://bioconductor.org/packages/release/bioc/html/DiffBind.html) using R 4.0. But I am getting several errors:

ERROR: lazy loading failed for package ‘DOT’

No package ‘librsvg-2.0’ found

ERROR: configuration failed for package ‘rsvg’

ERROR: dependencies ‘ShortRead’, ‘VariantAnnotation’, ‘DOT’, ‘rsvg’ are not available for package ‘systemPipeR’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/4.0/systemPipeR’

ERROR: dependency ‘systemPipeR’ is not available for package ‘DiffBind’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/4.0/DiffBind’

I tried installing the dependencies individually as well but it seems that some environment variables are missing may be. Can you please help me with this?

Thank You

The librsvg package is a system library dependency that we currently do not have installed. I’ll look into installing this and get back to you.

Thank you so much for the help.

I’ve installed the librsvg library and I’ve also installed the rsvg package in the system library. If you module load usc r libjpeg libjpeg-turbo v8 before starting R, then you should be able to install the DiffBind package now.

Thank you. I tried installing DiffBind after loading librsvg library however I am still getting some errors:

  • installing source package ‘RCurl’ …

** package ‘RCurl’ successfully unpacked and MD5 sums checked

** using staged installation

checking for curl-config… no

Cannot find curl-config

ERROR: configuration failed for package ‘RCurl’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/RCurl’

  • installing source package ‘Rhtslib’ …

** using non-staged installation via StagedInstall field

** libs

cd “htslib-1.7” && make -f “/spack/apps/linux-centos7-x86_64/gcc-8.3.0/r-3.6.3-4btvukdlo2urcpamiyiewp43hz2kjuja/rlib/R/etc/Makeconf” -f “Makefile.Rhtslib”

make[1]: Entering directory `/tmp/Rtmp5ghvrD/R.INSTALL8c66213d8a7f/Rhtslib/src/htslib-1.7’

Makefile.Rhtslib:128: warning: overriding recipe for target `.c.o’

/spack/apps/linux-centos7-x86_64/gcc-8.3.0/r-3.6.3-4btvukdlo2urcpamiyiewp43hz2kjuja/rlib/R/etc/Makeconf:168: warning: ignoring old recipe for target `.c.o’

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o kfunc.o kfunc.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o knetfile.o knetfile.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o kstring.o kstring.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o bcf_sr_sort.o bcf_sr_sort.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o bgzf.o bgzf.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o errmod.o errmod.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o faidx.o faidx.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o hfile.o hfile.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o hfile_net.o hfile_net.c

echo ‘#define HTS_VERSION “1.7”’ > version.h

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o hts.o hts.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o hts_os.o hts_os.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o md5.o md5.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o multipart.o multipart.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o probaln.o probaln.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o realn.o realn.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o regidx.o regidx.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o sam.o sam.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o synced_bcf_reader.o synced_bcf_reader.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o vcf_sweep.o vcf_sweep.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o tbx.o tbx.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o textutils.o textutils.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o thread_pool.o thread_pool.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o vcf.o vcf.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o vcfutils.o vcfutils.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o cram/cram_codecs.o cram/cram_codecs.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o cram/cram_decode.o cram/cram_decode.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o cram/cram_encode.o cram/cram_encode.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o cram/cram_external.o cram/cram_external.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o cram/cram_index.o cram/cram_index.c

/spack/apps/gcc/8.3.0/bin/gcc -g -O2 -fpic -I. -I/usr/local/include -D_FILE_OFFSET_BITS=64 -c -o cram/cram_io.o cram/cram_io.c

cram/cram_io.c:57:10: fatal error: bzlib.h: No such file or directory

#include <bzlib.h>

^~~~~~~~~

compilation terminated.

make[1]: *** [cram/cram_io.o] Error 1

make[1]: Leaving directory `/tmp/Rtmp5ghvrD/R.INSTALL8c66213d8a7f/Rhtslib/src/htslib-1.7’

make: *** [htslib] Error 2

ERROR: compilation failed for package ‘Rhtslib’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib’

ERROR: dependency ‘RCurl’ is not available for package ‘AnnotationForge’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/AnnotationForge’

ERROR: dependency ‘RCurl’ is not available for package ‘GenomeInfoDb’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/GenomeInfoDb’

ERROR: dependency ‘RCurl’ is not available for package ‘annotate’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/annotate’

ERROR: dependency ‘annotate’ is not available for package ‘GSEABase’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/GSEABase’

ERROR: dependency ‘annotate’ is not available for package ‘genefilter’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/genefilter’

ERROR: dependency ‘annotate’ is not available for package ‘geneplotter’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/geneplotter’

ERROR: dependency ‘GenomeInfoDb’ is not available for package ‘GenomicRanges’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/GenomicRanges’

ERROR: dependencies ‘GSEABase’, ‘genefilter’, ‘annotate’ are not available for package ‘Category’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/Category’

ERROR: dependencies ‘GenomicRanges’, ‘GenomeInfoDb’ are not available for package ‘SummarizedExperiment’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/SummarizedExperiment’

ERROR: dependencies ‘GenomeInfoDb’, ‘GenomicRanges’, ‘Rhtslib’ are not available for package ‘Rsamtools’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/Rsamtools’

ERROR: dependencies ‘Category’, ‘annotate’, ‘AnnotationForge’ are not available for package ‘GOstats’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/GOstats’

ERROR: dependencies ‘GenomeInfoDb’, ‘GenomicRanges’, ‘SummarizedExperiment’, ‘Rsamtools’ are not available for package ‘GenomicAlignments’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/GenomicAlignments’

ERROR: dependencies ‘GenomicRanges’, ‘SummarizedExperiment’, ‘genefilter’, ‘geneplotter’ are not available for package ‘DESeq2’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/DESeq2’

ERROR: dependencies ‘GenomicRanges’, ‘GenomeInfoDb’, ‘RCurl’, ‘Rsamtools’, ‘GenomicAlignments’ are not available for package ‘rtracklayer’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/rtracklayer’

ERROR: dependencies ‘Rsamtools’, ‘GenomicAlignments’, ‘GenomeInfoDb’, ‘GenomicRanges’ are not available for package ‘ShortRead’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/ShortRead’

ERROR: dependencies ‘GenomeInfoDb’, ‘GenomicRanges’, ‘rtracklayer’, ‘Rsamtools’ are not available for package ‘BSgenome’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/BSgenome’

ERROR: dependencies ‘GenomeInfoDb’, ‘GenomicRanges’, ‘RCurl’, ‘rtracklayer’ are not available for package ‘GenomicFeatures’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/GenomicFeatures’

ERROR: dependencies ‘GenomeInfoDb’, ‘GenomicRanges’, ‘SummarizedExperiment’, ‘Rsamtools’, ‘rtracklayer’, ‘BSgenome’, ‘GenomicFeatures’, ‘Rhtslib’ are not available for package ‘VariantAnnotation’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/VariantAnnotation’

ERROR: dependencies ‘Rsamtools’, ‘ShortRead’, ‘GenomicRanges’, ‘GenomicFeatures’, ‘SummarizedExperiment’, ‘VariantAnnotation’, ‘DESeq2’, ‘GOstats’, ‘annotate’ are not available for package ‘systemPipeR’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/systemPipeR’

ERROR: dependencies ‘GenomicRanges’, ‘SummarizedExperiment’, ‘GenomicAlignments’, ‘systemPipeR’, ‘Rsamtools’, ‘DESeq2’, ‘Rhtslib’ are not available for package ‘DiffBind’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/DiffBind’

The downloaded source packages are in

‘/tmp/RtmpNoipKk/downloaded_packages’

Installation path not writeable, unable to update packages: anytime, backports,

baguette, bit64, broom, callr, chron, cli, clipr, codetools, conquer, covr,

cpp11, data.table, dbplyr, devtools, dials, digest, discrim, distributional,

doParallel, dplyr, drake, DT, e1071, earth, fabletools, feasts, flexmix,

foreach, Formula, furrr, future, generics, globals, glue, graphlayouts,

htmlTable, htmlwidgets, igraph, inline, iterators, jsonlite, kableExtra,

KernSmooth, knitr, labeling, lava, lgr, lhs, libcoin, lme4, lmtest, MASS,

matrixStats, mgcv, mlr3, mlr3measures, mlr3misc, modeldata, multcomp, nlme,

nloptr, NLP, openssl, openxlsx, paradox, parsnip, partykit, plotmo, processx,

ps, quantreg, R6, RcppArmadillo, readr, recipes, renv, reticulate, rlang,

RMariaDB, rmarkdown, rsample, RSQLite, sandwich, sp, SQUAREM, StanHeaders,

statmod, storr, stringi, survival, testthat, tibble, tidypredict, tidyr,

tinytex, tsibble, TTR, usethis, V8, vctrs, warp, withr, workflows, xfun, XML,

xts, zip

There were 22 warnings (use warnings() to see them)

For the RCurl and Rhtslib packages, you’ll have to load a few more modules: module load bzip2 curl htslib

Loaded the modules you suggested. But now I get these errors:

cram/cram_io.c:57:10: fatal error: bzlib.h: No such file or directory

#include <bzlib.h>

^~~~~~~~~

compilation terminated.

make[1]: *** [cram/cram_io.o] Error 1

make[1]: Leaving directory `/tmp/Rtmpc1EsRX/R.INSTALL3f4251a4657db/Rhtslib/src/htslib-1.7’

make: *** [htslib] Error 2

ERROR: compilation failed for package ‘Rhtslib’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/Rhtslib’

ERROR: dependency ‘Rhtslib’ is not available for package ‘Rsamtools’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/Rsamtools’

ERROR: dependency ‘Rsamtools’ is not available for package ‘GenomicAlignments’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/GenomicAlignments’

ERROR: dependencies ‘Rsamtools’, ‘GenomicAlignments’ are not available for package ‘rtracklayer’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/rtracklayer’

ERROR: dependencies ‘Rsamtools’, ‘GenomicAlignments’ are not available for package ‘ShortRead’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/ShortRead’

ERROR: dependencies ‘rtracklayer’, ‘Rsamtools’ are not available for package ‘BSgenome’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/BSgenome’

ERROR: dependency ‘rtracklayer’ is not available for package ‘GenomicFeatures’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/GenomicFeatures’

ERROR: dependencies ‘Rsamtools’, ‘rtracklayer’, ‘BSgenome’, ‘GenomicFeatures’, ‘Rhtslib’ are not available for package ‘VariantAnnotation’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/VariantAnnotation’

ERROR: dependencies ‘Rsamtools’, ‘ShortRead’, ‘GenomicFeatures’, ‘VariantAnnotation’ are not available for package ‘systemPipeR’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/systemPipeR’

ERROR: dependencies ‘GenomicAlignments’, ‘systemPipeR’, ‘Rsamtools’, ‘Rhtslib’ are not available for package ‘DiffBind’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/3.6/DiffBind’

Ah, actually the source code for the Rhtslib package has to be modified, so I’ve gone ahead and installed this package in the system library. It will sync over to Discovery in an hour or so. Once that’s available, try installing DiffBind again.

Hi…I tried installing again but I am getting the following error:

collect2: error: ld returned 1 exit status

make: *** [DiffBind.so] Error 1

ERROR: compilation failed for package ‘DiffBind’

  • removing ‘/home1/arijitas/R/x86_64-pc-linux-gnu-library/4.0/DiffBind’

A few people have asked about this package, so I went ahead and installed it in the system library. To use it, you will first to need load the following modules before starting R:

module load usc libjpeg libjpeg-turbo v8 r

But I could help you debug more if you want to install your own version.

Hi… thank you for helping me with this. But unfortunately I am again getting the same error:

collect2: error: ld returned 1 exit status

make: *** [DiffBind.so] Error 1

ERROR: compilation failed for package ‘DiffBind’

Can you please help me with this?

To clarify, I installed DiffBind in the system library so that you can just load it and use it. After loading those modules, open R and try loading it with library("DiffBind") and then try using it. Also, you can use the library() command to see all the installed packages available.

This worked!!! Thank you so much. Really appreciate your help.