Restoring tries to download nonexistent file
Closed this issue · 4 comments
Error when restoring:
Attaching packrat
Restoring library
Installing Rcpp (0.11.5) ... Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.11.5.tgz'
In addition: Warning message:
In download.file(url, destfile, method, mode = "wb", ...) :
cannot open: HTTP status was '404 Not Found'
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘Rcpp’ failed
Tries to restore Rcpp_0.11.5.tgz from CRAN. The file that exists there is actually Rcpp_0.11.5.tar.gz. Local packrat/src/Rcpp has Rcpp_0.11.5.tar.gz file.
Here's my sessionInfo():
R version 3.2.0 (2015-04-16)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8attached base packages:
[1] stats graphics grDevices utils datasets methods baseother attached packages:
[1] packrat_0.4.3-19loaded via a namespace (and not attached):
[1] tools_3.2.0
Similar issue when trying to create a Shiny App with packrat from RStudio:
Initializing packrat project in directory:
"/Users/pbashyal/bioinformatics/App1"Adding these packages to packrat:
_
R6 2.0.1
Rcpp 0.11.5
digest 0.6.8
htmltools 0.2.6
httpuv 1.3.2
jsonlite 0.9.16
mime 0.3
packrat 0.4.3-19
shiny 0.11.1.9004
xtable 1.7-4Fetching sources for R6 (2.0.1) ... OK (CRAN current)
Fetching sources for Rcpp (0.11.5) ... OK (CRAN current)
Fetching sources for digest (0.6.8) ... OK (CRAN current)
Fetching sources for htmltools (0.2.6) ... OK (CRAN current)
Fetching sources for httpuv (1.3.2) ... OK (CRAN current)
Fetching sources for jsonlite (0.9.16) ... OK (CRAN current)
Fetching sources for mime (0.3) ... OK (CRAN current)
Fetching sources for packrat (0.4.3-19) ... OK (GitHub)
Fetching sources for shiny (0.11.1.9004) ... OK (GitHub)
Fetching sources for xtable (1.7-4) ... OK (CRAN current)
Snapshot written to '/Users/pbashyal/bioinformatics/App1/packrat/packrat.lock'
Installing R6 (2.0.1) ... Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'http://cran.rstudio.com/src/contrib/R6_2.0.1.tgz'
In addition: Warning message:
In download.file(url, destfile, method, mode = "wb", ...) :
cannot open: HTTP status was '404 Not Found'
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘R6’ failed
Error in hash(descFile) :
It sounds like this is related to #207 -- does it help if you set options(pkgType = "source")
or options(pkgType = "mac.binary.mavericks")
? This will hopefully be fixed soon but I think that should be a sufficient workaround in the interim.
options(pkgType = "mac.binary.mavericks")
seems to make restore()
work.
Thanks for your help.
Got a similar error on Windows
R version 3.2.0 (2015-04-16) -- "Full of Ingredients"
Platform: x86_64-w64-mingw32/x64 (64-bit)
...
Packrat is not installed in the local library -- attempting to bootstrap an installation...
> No source tarball of packrat available locally
> Using user-library packrat (0.4.3) to bootstrap this project
Installing MASS (7.3-40) ... Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'http://cran.rstudio.com/src/contrib/MASS_7.3-40.zip'
In addition: Warning messages:
1: In packrat::restore(prompt = FALSE, restart = TRUE) :
The most recent snapshot was generated using R version 3.1.3
2: In download.file(url, destfile, method, mode = "wb", ...) :
cannot open: HTTP status was '404 Not Found'
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘MASS’ failed
Adding options(pkgType = "binary")
to the .Rprofile file fixed the problem.