Unable to install DiffBind and DESeq2 4.0.3 and 4.0.4 (Package not available on these version of R error)
1
0
Entering edit mode
3.1 years ago

Hello,

Can anyone assist with how to I can install DiffBind and DESeq2 on the latest R version 4.0.4.

I have tried installing via the following means 1. source by downloading the source package (.tar.gz) on bio-conductor website

install.packages("~/Downloads/DESeq2_1.30.1.tar.gz", repos = NULL, type = "source")

  1. Via BiocManager

    if (!requireNamespace("BiocManager", quietly = TRUE))

    • install.packages("BiocManager") > BiocManager::install("DiffBind")
  2. install.packages(file.choose(), repos=NULL)

Thank you.

ChIP-Seq • 3.5k views
ADD COMMENT
1
Entering edit mode

I have similar problem when installing DESeq2.

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=...'

I have installed libcurl4-openssl-dev (it was already installed on my system). I don't understand part about: PATH and PKG_CONFIG_PATH. Everywhere I was looking for answer people assume you should know this. I would really appreciate if someone could explain me this.

ADD REPLY
1
Entering edit mode

See this post: https://stackoverflow.com/a/60878166

There is a link in it to a more detailed description of where the .pc file is installed. It is likely in /usr/lib/x86_64-linux-gnu/pkgconfig/libcurl.pc location.

ADD REPLY
0
Entering edit mode

Thanks a lot for your answer. The link you've shared and checking some Linux basics helped me to solve the problem! I run:

#adding libcurl.pc file location to PATH and PKG_CONFIG_PATH
export PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:$PATH
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig

After this I was able to install DESeq2 without errors.

NOTE: To make these changes permanent you need to add them to .bashrc

ADD REPLY
0
Entering edit mode

Thank you for response @Kevin Blighe. Kindly find below the error messages for DESeq2, similar error was observed for DiffBind too.

> BiocManager::install('DESeq2')
Bioconductor version 3.12 (BiocManager
  1.30.10), R 4.0.4 (2021-02-15)
Installing package(s) 'DESeq2'
also installing the dependencies ‘curl’, ‘openssl’, ‘RCurl’, ‘XML’, ‘httr’, ‘GenomeInfoDb’, ‘annotate’, ‘GenomicRanges’, ‘SummarizedExperiment’, ‘genefilter’, ‘geneplotter’

trying URL 'https://cloud.r-project.org/src/contrib/curl_4.3.tar.gz'
Content type 'application/x-gzip' length 673779 bytes (657 KB)
==================================================
downloaded 657 KB

trying URL 'https://cloud.r-project.org/src/contrib/openssl_1.4.3.tar.gz'
Content type 'application/x-gzip' length 1207708 bytes (1.2 MB)
==================================================
downloaded 1.2 MB

trying URL 'https://cloud.r-project.org/src/contrib/RCurl_1.98-1.3.tar.gz'
Content type 'application/x-gzip' length 728630 bytes (711 KB)
==================================================
downloaded 711 KB

trying URL 'https://cloud.r-project.org/src/contrib/XML_3.99-0.6.tar.gz'
Content type 'application/x-gzip' length 968773 bytes (946 KB)
==================================================
downloaded 946 KB

trying URL 'https://cloud.r-project.org/src/contrib/httr_1.4.2.tar.gz'
Content type 'application/x-gzip' length 159950 bytes (156 KB)
==================================================
downloaded 156 KB

trying URL 'https://bioconductor.org/packages/3.12/bioc/src/contrib/GenomeInfoDb_1.26.4.tar.gz'
Content type 'application/x-gzip' length 3453704 bytes (3.3 MB)
==================================================
downloaded 3.3 MB

trying URL 'https://bioconductor.org/packages/3.12/bioc/src/contrib/annotate_1.68.0.tar.gz'
Content type 'application/x-gzip' length 1872445 bytes (1.8 MB)
==================================================
downloaded 1.8 MB

trying URL 'https://bioconductor.org/packages/3.12/bioc/src/contrib/GenomicRanges_1.42.0.tar.gz'
Content type 'application/x-gzip' length 1175587 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

trying URL 'https://bioconductor.org/packages/3.12/bioc/src/contrib/SummarizedExperiment_1.20.0.tar.gz'
Content type 'application/x-gzip' length 1523133 bytes (1.5 MB)
==================================================
downloaded 1.5 MB

trying URL 'https://bioconductor.org/packages/3.12/bioc/src/contrib/genefilter_1.72.1.tar.gz'
Content type 'application/x-gzip' length 814755 bytes (795 KB)
==================================================
downloaded 795 KB

trying URL 'https://bioconductor.org/packages/3.12/bioc/src/contrib/geneplotter_1.68.0.tar.gz'
Content type 'application/x-gzip' length 1433556 bytes (1.4 MB)
==================================================
downloaded 1.4 MB

trying URL 'https://bioconductor.org/packages/3.12/bioc/src/contrib/DESeq2_1.30.1.tar.gz'
Content type 'application/x-gzip' length 2067936 bytes (2.0 MB)
==================================================
downloaded 2.0 MB

* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
** using staged installation
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lcurl
------------------------- 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’
* removing ‘/home/mthamza/R/x86_64-pc-linux-gnu-library/4.0/curl’
* installing *source* package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
** using staged installation
Using PKG_CFLAGS=
ADD REPLY
2
Entering edit mode
3.1 years ago

The correct way to install is:

BiocManager::install('DESeq2')
BiocManager::install('DiffBind')

If these commands produce an error message (or messages), then please paste, here, the error message(s). Please also show the output of sessionInfo()

Kevin

ADD COMMENT
0
Entering edit mode
--------------------------- [ANTICONF] --------------------------------
Configuration failed because openssl was not found. Try installing:
 * deb: libssl-dev (Debian, Ubuntu, etc)
 * rpm: openssl-devel (Fedora, CentOS, RHEL)
 * csw: libssl_dev (Solaris)
 * brew: openssl@1.1 (Mac OSX)
If openssl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a openssl.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 MESSAGE] ---------------------------
tools/version.c:1:10: fatal error: openssl/opensslv.h: No such file or directory
    1 | #include <openssl/opensslv.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘openssl’
* removing ‘/home/mthamza/R/x86_64-pc-linux-gnu-library/4.0/openssl’
* 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 ‘/home/mthamza/R/x86_64-pc-linux-gnu-library/4.0/RCurl’
* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for sed... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking for xml2-config... no
Cannot find xml2-config
ERROR: configuration failed for package ‘XML’
* removing ‘/home/mthamza/R/x86_64-pc-linux-gnu-library/4.0/XML’
ERROR: dependencies ‘curl’, ‘openssl’ are not available for package ‘httr’
* removing ‘/home/mthamza/R/x86_64-pc-linux-gnu-library/4.0/httr’
ERROR: dependency ‘RCurl’ is not available for package ‘GenomeInfoDb’
* removing ‘/home/mthamza/R/x86_64-pc-linux-gnu-library/4.0/GenomeInfoDb’
ERROR: dependencies ‘XML’, ‘httr’ are not available for package ‘annotate’
* removing ‘/home/mthamza/R/x86_64-pc-linux-gnu-library/4.0/annotate’
ERROR: dependency ‘GenomeInfoDb’ is not available for package ‘GenomicRanges’
* removing ‘/home/mthamza/R/x86_64-pc-linux-gnu-library/4.0/GenomicRanges’
ERROR: dependencies ‘GenomicRanges’, ‘GenomeInfoDb’ are not available for package ‘SummarizedExperiment’
* removing ‘/home/mthamza/R/x86_64-pc-linux-gnu-library/4.0/SummarizedExperiment’
ERROR: dependency ‘annotate’ is not available for package ‘genefilter’
* removing ‘/home/mthamza/R/x86_64-pc-linux-gnu-library/4.0/genefilter’
ERROR: dependency ‘annotate’ is not available for package ‘geneplotter’
* removing ‘/home/mthamza/R/x86_64-pc-linux-gnu-library/4.0/geneplotter’
ERROR: dependencies ‘GenomicRanges’, ‘SummarizedExperiment’, ‘genefilter’, ‘geneplotter’ are not available for package ‘DESeq2’
* removing ‘/home/mthamza/R/x86_64-pc-linux-gnu-library/4.0/DESeq2’

The downloaded source packages are in
    ‘/tmp/Rtmp3gWou5/downloaded_packages’
There were 12 warnings (use warnings() to see them)
> sessionInfo()
R version 4.0.4 (2021-02-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8      
 [2] LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8      
 [8] LC_NAME=C                 
 [9] LC_ADDRESS=C              
[10] LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8
[12] LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils    
[5] datasets  methods   base     

loaded via a namespace (and not attached):
[1] BiocManager_1.30.10 compiler_4.0.4     
[3] tools_4.0.4         tinytex_0.30       
[5] xfun_0.22          
> library(DESeq2)
Error in library(DESeq2) : there is no package called ‘DESeq2’
ADD REPLY
1
Entering edit mode

Hi, you need to install some packages on your OS, i.e., outside of R. It seems that you would need to run, on Ubuntu:

sudo apt-get install libssl-dev
sudo apt-get install libcurl-dev
ADD REPLY
0
Entering edit mode

Thank you Kevin...However, please note that the following error message was encountered after installing the dependency above.

> install.packages('DESeq2')
Installing package into ‘/home/mthamza/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘DESeq2’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
ADD REPLY
0
Entering edit mode

Have a look here to check how to install DESeq2 https://bioinformatics.stackexchange.com/a/5581 (obviously change the R version to the current one)

In case you are not using anaconda, you can use bioconductor and type this in R:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("DESeq2")
ADD REPLY

Login before adding your answer.

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