我想我可能不确定工作流程的packrat
预期。
我正在尝试制作一个packrat
用于依赖管理的 docker 映像。作为一个简单的例子,我有:
- 创建了一个全新的项目
- 冉
packrat::on()
install.packages("RSQLite")
packrat::snapshot()
- 为了模拟 docker 环境,我删除了所有
packrat/lib*
文件夹和src
,因为我会将它们添加到 中.dockerignore
,因为所需的所有包信息都在packrat.lock
文件中 - 然后运行
packrat::restore()
我遇到了错误:
(此处格式混乱,没有一行)
> packrat::restore()
Installing BH (1.62.0-1) ...
OK (built source)
Installing DBI (0.7) ...
OK (built source)
Installing RSQLite (2.0) ...
Error: Command failed (1)
Failed to run system command:
'/usr/lib/R/bin/R' --vanilla CMD INSTALL '/tmp/RtmppGgJVt/RSQLite' --library='/home/akhil/example/packrat/packrat/lib/x86_64-pc-linux-gnu/3.3.3' --install-tests --no-docs --no-multiarch --no-demo
The command failed with output:
ERROR: dependencies 'bit64', 'blob' are not available for package 'RSQLite'
* removing '/home/akhil/example/packrat/packrat/lib/x86_64-pc-linux-gnu/3.3.3/RSQLite'
在这一点上我应该做什么有点困惑 -bit64
并且blob
在lock
文件中,但我不知道如何告诉 packrat 先安装依赖项。
packrat::bundle()
我使用and得到了相同的结果packrat::unbundle(..., restore = TRUE)
(据我所知,它和我做的一样,只是保留packrat/src/
文件夹)。
谢谢