Trouble downloading dada2
0
0
Entering edit mode
@c45b7d8d
Last seen 14 months ago
United States

Why is this code not working?

> BiocManager::install("dada2", version = "3.16")

'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: http://ftp.osuosl.org/pub/cran/

Warning: unable to access index for repository https://bioconductor.org/packages/3.16/bioc/src/contrib:
  cannot open URL 'https://bioconductor.org/packages/3.16/bioc/src/contrib/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.16/data/annotation/src/contrib:
  cannot open URL 'https://bioconductor.org/packages/3.16/data/annotation/src/contrib/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.16/data/experiment/src/contrib:
  cannot open URL 'https://bioconductor.org/packages/3.16/data/experiment/src/contrib/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.16/workflows/src/contrib:
  cannot open URL 'https://bioconductor.org/packages/3.16/workflows/src/contrib/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.16/books/src/contrib:
  cannot open URL 'https://bioconductor.org/packages/3.16/books/src/contrib/PACKAGES'
Bioconductor version 3.16 (BiocManager 1.30.19), R 4.2.2 (2022-10-31
  ucrt)
Installing package(s) 'dada2'
Warning: unable to access index for repository https://bioconductor.org/packages/3.16/bioc/src/contrib:
  cannot open URL 'https://bioconductor.org/packages/3.16/bioc/src/contrib/PACKAGES'
dada dada2 • 2.0k views
ADD COMMENT
0
Entering edit mode

What is your sessionInfo() so we know what system you are using? Also are you online with internet access?

ADD REPLY
0
Entering edit mode

Here is my sessioninfo().

I have internet access.

R version 4.2.2 (2022-10-31 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.utf8 [2] LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 [4] LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

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

loaded via a namespace (and not attached): [1] fansi_1.0.4 dplyr_1.1.0 utf8_1.2.3 grid_4.2.2
[5] R6_2.5.1 lifecycle_1.0.3 gtable_0.3.1 magrittr_2.0.3
[9] scales_1.2.1 ggplot2_3.4.1 pillar_1.8.1 rlang_1.0.6
[13] cli_3.6.0 rstudioapi_0.14 generics_0.1.3 vctrs_0.5.2
[17] tools_4.2.2 glue_1.6.2 munsell_0.5.0 compiler_4.2.2
[21] pkgconfig_2.0.3 colorspace_2.1-0 tidyselect_1.2.0 tibble_3.1.8

ADD REPLY
0
Entering edit mode

There are some some tips and suggested items in this related post: unable to access index for repository

ADD REPLY
0
Entering edit mode

Thank you for the link to the other related post. I am actually still experiencing issues after trying all the suggestions. This is my latest code:

> options(BioC_mirror = "http://bioconductor.org")

> BiocManager::install("dada2")

'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: http://ftp.osuosl.org/pub/cran/

Bioconductor version 3.16 (BiocManager 1.30.19), R 4.2.2 (2022-10-31
  ucrt)
Installing package(s) 'dada2'
also installing the dependency ‘Rcpp’

trying URL 'http://ftp.osuosl.org/pub/cran/bin/windows/contrib/4.2/Rcpp_1.0.10.zip'
Content type 'application/zip' length 2819280 bytes (2.7 MB)
downloaded 14 KB

Error in download.file(url, destfile, method, mode = "wb", ...) : 
  download from 'http://ftp.osuosl.org/pub/cran/bin/windows/contrib/4.2/Rcpp_1.0.10.zip' failed
In addition: Warning messages:
1: In download.file(url, destfile, method, mode = "wb", ...) :
  downloaded length 14374 != reported length 2819280
2: In download.file(url, destfile, method, mode = "wb", ...) :
  URL 'http://ftp.osuosl.org/pub/cran/bin/windows/contrib/4.2/Rcpp_1.0.10.zip': status was 'Failure when receiving data from the peer'
Warning in download.packages(pkgs, destdir = tmpd, available = available,  :
  download of package ‘Rcpp’ failed
trying URL 'http://bioconductor.org/packages/3.16/bioc/bin/windows/contrib/4.2/dada2_1.26.0.zip'
Content type 'application/zip' length 3550286 bytes (3.4 MB)
downloaded 3.4 MB

package ‘dada2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\elliot.tchon\AppData\Local\Temp\RtmpOgfQCn\downloaded_packages
Installation paths not writeable, unable to update packages
  path: C:/Program Files/R/R-4.2.2/library
  packages:
    survival
Old packages: 'httpuv'
ADD REPLY
0
Entering edit mode

It looks like the dependency Rccp is actually the reason it is failing. Can you try installing just Rccp and see if there is a more detailed ERROR message. Also please place code output with a pre and post triple backtick to format output correctly.

BiocManager::install('Rccp')
ADD REPLY
0
Entering edit mode

My apologies. here is the error message that appeared.

> BiocManager::install('Rccp')
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: http://ftp.osuosl.org/pub/cran/

Bioconductor version 3.16 (BiocManager 1.30.19), R 4.2.2 (2022-10-31
  ucrt)
Installing package(s) 'Rccp'
Installation paths not writeable, unable to update packages
  path: C:/Program Files/R/R-4.2.2/library
  packages:
    survival
Old packages: 'httpuv'
Update all/some/none? [a/s/n]: 
a
also installing the dependency ‘Rcpp’


  There is a binary version available but the source version is
  later:
       binary source needs_compilation
httpuv  1.6.8  1.6.9              TRUE

trying URL 'http://ftp.osuosl.org/pub/cran/bin/windows/contrib/4.2/Rcpp_1.0.10.zip'
Content type 'application/zip' length 2819280 bytes (2.7 MB)
downloaded 14 KB

Error in download.file(url, destfile, method, mode = "wb", ...) : 
  download from 'http://ftp.osuosl.org/pub/cran/bin/windows/contrib/4.2/Rcpp_1.0.10.zip' failed
In addition: Warning messages:
1: package ‘Rccp’ is not available for Bioconductor version '3.16'

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 
2: In download.file(url, destfile, method, mode = "wb", ...) :
  downloaded length 14374 != reported length 2819280
3: In download.file(url, destfile, method, mode = "wb", ...) :
  URL 'http://ftp.osuosl.org/pub/cran/bin/windows/contrib/4.2/Rcpp_1.0.10.zip': status was 'Failure when receiving data from the peer'
Warning in download.packages(pkgs, destdir = tmpd, available = available,  :
  download of package ‘Rcpp’ failed
installing the source package ‘httpuv’

trying URL 'http://ftp.osuosl.org/pub/cran/src/contrib/httpuv_1.6.9.tar.gz'
Content type 'application/x-gzip' length 1875081 bytes (1.8 MB)
downloaded 42 KB

Error in download.file(url, destfile, method, mode = "wb", ...) : 
  download from 'http://ftp.osuosl.org/pub/cran/src/contrib/httpuv_1.6.9.tar.gz' failed
In addition: Warning messages:
1: In download.file(url, destfile, method, mode = "wb", ...) :
  downloaded length 43571 != reported length 1875081
2: In download.file(url, destfile, method, mode = "wb", ...) :
  URL 'http://ftp.osuosl.org/pub/cran/src/contrib/httpuv_1.6.9.tar.gz': status was 'Failure when receiving data from the peer'
Warning in download.packages(pkgs, destdir = tmpd, available = available,  :
  download of package ‘httpuv’ failed
ADD REPLY
0
Entering edit mode

It looks like the download of the files from the CRAN mirror is failing and the download isn't completefor Rccp and now httpuv. I would try increasing the download timeout to something greater like options(timeout=1000000) and trying again to see if the package finishes downloading (or at least get a greater length) or if it persists using a different CRAN mirror.

ADD REPLY
0
Entering edit mode

Hello! I have tried that options(timeout=1000000) and this is the result.

> BiocManager::install('Rccp')
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: http://cran.rstudio.com/

Bioconductor version 3.16 (BiocManager 1.30.19), R 4.2.2 (2022-10-31
  ucrt)
Installing package(s) 'Rccp'
Installation paths not writeable, unable to update packages
  path: C:/Program Files/R/R-4.2.2/library
  packages:
    survival
Warning message:
package ‘Rccp’ is not available for Bioconductor version '3.16'

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

It's Rcpp, not Rccp.

ADD REPLY
0
Entering edit mode

Thank you for the clarification. I have tried it with Rcpp and I am still encountering errors in the downloading. I am working from a work computer and their provided network. Could this be the issue?

> BiocManager::install('Rcpp')
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: http://cran.rstudio.com/

Bioconductor version 3.16 (BiocManager 1.30.19), R 4.2.2 (2022-10-31
  ucrt)
Installing package(s) 'Rcpp'
trying URL 'http://cran.rstudio.com/bin/windows/contrib/4.2/Rcpp_1.0.10.zip'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/4.2/Rcpp_1.0.10.zip'
In addition: Warning message:
In download.file(url, destfile, method, mode = "wb", ...) :
  URL 'http://cran.rstudio.com/bin/windows/contrib/4.2/Rcpp_1.0.10.zip': status was 'Failure when receiving data from the peer'
Warning in download.packages(pkgs, destdir = tmpd, available = available,  :
  download of package ‘Rcpp’ failed
Installation paths not writeable, unable to update packages
  path: C:/Program Files/R/R-4.2.2/library
  packages:
    survival
ADD REPLY
0
Entering edit mode

I can download Rcpp from the RStudio CRAN repo, so you could try again. Alternatively, you were able to use http://ftp.osuosl.org/pub/cran/ previously, so you could try

library(BiocManager)
options(repos = "http://ftp.osuosl.org/pub/cran/")
install("Rcpp")
ADD REPLY
0
Entering edit mode

I tried the code you added.

> library(BiocManager)
Bioconductor version 3.16 (BiocManager 1.30.19), R 4.2.2 (2022-10-31
  ucrt)
> options(repos = "http://ftp.osuosl.org/pub/cran/")
> install("Rcpp")
Bioconductor version 3.16 (BiocManager 1.30.19), R 4.2.2 (2022-10-31
  ucrt)
Installing package(s) 'Rcpp'
trying URL 'http://ftp.osuosl.org/pub/cran/bin/windows/contrib/4.2/Rcpp_1.0.10.zip'
Content type 'application/zip' length 2819280 bytes (2.7 MB)
downloaded 14 KB

Error in download.file(url, destfile, method, mode = "wb", ...) : 
  download from 'http://ftp.osuosl.org/pub/cran/bin/windows/contrib/4.2/Rcpp_1.0.10.zip' failed
In addition: Warning messages:
1: In download.file(url, destfile, method, mode = "wb", ...) :
  downloaded length 14374 != reported length 2819280
2: In download.file(url, destfile, method, mode = "wb", ...) :
  URL 'http://ftp.osuosl.org/pub/cran/bin/windows/contrib/4.2/Rcpp_1.0.10.zip': status was 'Failure when receiving data from the peer'
Warning in download.packages(pkgs, destdir = tmpd, available = available,  :
  download of package ‘Rcpp’ failed
Installation paths not writeable, unable to update packages
  path: C:/Program Files/R/R-4.2.2/library
  packages:
    survival
Error in data.frame(name = names(getOption("repos")), host = "", url = as.character(getOption("repos")),  : 
  arguments imply differing number of rows: 0, 1

I also tried to change it to RStudio CRAN repo.

> options(repos = "http://cran.rstudio.com/")
> install("Rcpp")
Bioconductor version 3.16 (BiocManager 1.30.19), R 4.2.2 (2022-10-31
  ucrt)
Installing package(s) 'Rcpp'
trying URL 'http://cran.rstudio.com/bin/windows/contrib/4.2/Rcpp_1.0.10.zip'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/4.2/Rcpp_1.0.10.zip'
In addition: Warning messages:
1: In download.file(url, destfile, method, mode = "wb", ...) :
  downloaded length 0 != reported length 6799
2: In download.file(url, destfile, method, mode = "wb", ...) :
  cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/4.2/Rcpp_1.0.10.zip': HTTP status was '503 Service Unavailable'
Warning in download.packages(pkgs, destdir = tmpd, available = available,  :
  download of package ‘Rcpp’ failed
Installation paths not writeable, unable to update packages
  path: C:/Program Files/R/R-4.2.2/library
  packages:
    survival
ADD REPLY
0
Entering edit mode

You might check with IT to see if they are blocking things. Also, do note the difference between the two repositories. In the first case you download some of the package but it appears to stop (did you adjust the timeout?). In the second case you get a 503 from the repository.

ADD REPLY
0
Entering edit mode

Would you suspect that IT is blocking downloads from cran.rstudio.com?

In regard to the first case, I used the code options(timeout=1000000).

What does the 503 error suggest?

ADD REPLY

Login before adding your answer.

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