Can't install packages with renv

I also have the same problem when using my Windows machine (I work on the same repo with a Linux machine and a Windows one: linux works great, wereas Windows does not).

I tried to reproduce it by running:

Sys.setenv(RENV_DOWNLOAD_METHOD = "libcurl")

But doesn't work. As a workaround I did the following:

  1. Close the project
  2. Install package as normal (without renv)
  3. Open the project using renv
  4. Restore snapshot

If the packages have previously been installed, they will be symlinked and they would work.

Unfortunately, this is extremely cumbersome, as many packages have dependencies and I have to manually install them all, and that's precisely one of the things I want to avoid and one of the reasons for using renv!

That's what I get:

> getOption("download.file.method")
[1] "wininet"
> renv:::renv_download_file_method()
[1] "curl"
>

And this is the error I get after running: Sys.setenv(RENV_DOWNLOAD_METHOD = "curl") (or wininet or libcurl)

Error: failed to retrieve package 'xfun'
In addition: Warning messages:
1: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.
2: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.
3: download failed [error code 35]
4: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.
5: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.