rstudio / packrat

Packrat is a dependency management system for R
http://rstudio.github.io/packrat/
401 stars 89 forks source link

packrat gives very little information when a package is not compatible with R #302

Open aronatkins opened 8 years ago

aronatkins commented 8 years ago

knitr-1.13 requires R greater than 3.0.2. However, when running packrat::restore against a project which demands knitr-1.13 on a system using R-3.0.2, we get very little output about the reason for the failed install.

Here is the output when attempting to install knitr from CRAN on R-3.0.2:

> install.packages(c("knitr"),repos="https://cran.rstudio.com/")
Installing package into ‘/home/vagrant/R’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository https://cran.rstudio.com/src/contrib
Warning message:
package ‘knitr’ is not available (for R version 3.0.2)

Here is the output when attempting to install from source:

> install.packages("knitr_1.13.tar.gz",type="source",repos=NULL)
Installing package into ‘/home/vagrant/R’
(as ‘lib’ is unspecified)
ERROR: this R is version 3.0.2, package 'knitr' requires R > 3.0.2
Warning message:
In install.packages("knitr_1.13.tar.gz", type = "source", repos = NULL) :
  installation of package ‘knitr_1.13.tar.gz’ had non-zero exit status

Here is the output from packrat::restore (trimmed):

Installing knitr (1.13) ...
curl: (22) The requested URL returned error: 404 Not Found
curl: (22) The requested URL returned error: 404 Not Found
curl: (22) The requested URL returned error: 404 Not Found
curl: (22) The requested URL returned error: 404 Not Found
curl: (22) The requested URL returned error: 404 Not Found
FAILED
Error in getSourceForPkgRecord(pkgRecord, srcDir(project), availablePkgs,  :
  Couldn't find source for version 1.13 of knitr
kevinushey commented 8 years ago

Thanks for the bug report -- I'll try to improve the error message reported by packrat here.

aronatkins commented 1 year ago

This retry/404 problem still confuses folks: https://github.com/rstudio/rsconnect/pull/791#issuecomment-1518661012