R packrat init失败:无法打开网址,找不到描述文件

时间:2015-05-09 16:16:04

标签: r macos packrat

安装packrat并运行packrat::init()后,我收到以下错误,我认为该错误正在尝试访问不再可用的网站,此外还有其他一些我不确定的错误是由第一个。

环境: - OS X 10.10.3 - R版本3.2.0 - packrat 0.4.3 - cran(不知道如何获得这个版本)

Fetching sources for packrat (0.4.3) ... OK (CRAN current)
Snapshot written to '/Users/user/RProjects/Data_Specialization/r_programming/packrat/packrat.lock'
Installing packrat (0.4.3) ... Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'http://cran.rstudio.com/src/contrib/packrat_0.4.3.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 ‘packrat’ failed
Error in hash(descFile) : 
  No DESCRIPTION file at path '/Users/user/RProjects/Data_Specialization/r_programming/packrat/lib/x86_64-apple-darwin13.4.0/3.2.0/packrat/DESCRIPTION'!

从我在issue中所读到的内容中,我还有值得注意的是,我有Biocinstaller v1.18.1

1 个答案:

答案 0 :(得分:2)

好的,所以它的版本兼容性问题。我们需要像这样安装来自github的packrat:

if (!require("devtools")) install.packages("devtools")
devtools::install_github("rstudio/packrat")

然后packrat::init()按预期工作。

有关存储库site的更多信息。

感谢@kevinushey解决此issue