Error message installing nlme with restore() command

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] ...
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:

Find my lockfile attached here (cannot attach because new user):!Aj9CHjc1p7AThJRPXSrfxH3kcHewfw?e=rLDhoY

Any help appreciated. :slight_smile:

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: installed (or it cannot find them).

I also note that you're using an older version of renv:

    "renv": {
      "Package": "renv",
      "Version": "0.7.1-20",
      "Source": "GitHub",
      "RemoteType": "github",
      "RemoteHost": "",
      "RemoteUsername": "rstudio",
      "RemoteRepo": "renv",
      "RemoteRef": "master",
      "RemoteSha": "e8857e7d46ea4c2188169d908481808a4a3e4563",
      "Hash": "3775ef1f40a06b4c0ecc5aa4aa9c9a28"

You might want to upgrade to the latest CRAN release, or the current development release.

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.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.