Packrat: Dependencies unavailable

593 Views Asked by At

I think I might be unsure of the workflow packrat expects.

I'm trying to make a docker image using packrat for dependencies management. As a simple example, I've:

  • Created a completely new project
  • Ran
    • packrat::on()
    • install.packages("RSQLite")
    • packrat::snapshot()
  • To the emulate the docker environment, I deleted all the packrat/lib* folder and src, as I would add these to the .dockerignore, as all the package information needed is in the packrat.lock file
  • Then running packrat::restore() I hit the error:

(formatting messed up without a line here)

> 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'

Slightly confused at what I should do at this point - bit64 and blob are in the lock file, but I don't know how to tell packrat to install the dependencies first.

I get the same result using packrat::bundle() and packrat::unbundle(..., restore = TRUE) (which, from what I can see, does the same as I was doing, just keeping the packrat/src/ folder).

Thanks

0

There are 0 best solutions below