Hi, I've been trying to integrate renv into my workflow. I've been dabbling around with moving an rproject to a new machine. I deleted the library and staging folders before moving the entire rproject to the new machine. There, I called renv::restore() command.
Everything worked fine, packages were downloaded. However, I got an error message when installing nlme:
Installing nlme [3.1-137] ...
FAILED
Error installing package 'nlme':
================================
* installing *source* package 'nlme' ...
** package 'nlme' successfully unpacked and MD5 sums checked
** using staged installation
** libs
Warning in system(paste(cmd, "shlib-clean")) : 'make' not found
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'nlme'
* removing 'C:/Users/niklasj/OneDrive/Dokumente/Uni/Projects/Humor Project/rproj/renv/staging/1/nlme'
In addition, I get quite a lot of warnings for the other packages:
Warning messages:
1: In downloader(url, destfile, type, request, headers) :
curl: (6) Could not resolve host: NA
Apparently I'm not the only one experiencing this:
The problem is that the version of nlme recorded in your project is not current: the current version of nlme available on CRAN is 3.1-142, whereas version 3.1-137 is recorded in your lockfile.
Because of that, renv instead attempts to download and install the source package. This fails because your machine does not have the requisite build tools (that is, Rtools: https://cran.r-project.org/bin/windows/Rtools/) installed (or it cannot find them).
I also note that you're using an older version of renv:
Thanks for the help. I had Rtools installed, but turns out I had forgotten to add Rtools to the system path during installation. After re-installing with an included system path, installing all packages from the lockfile worked.