0

I started a new project in Rstudio and selected the option to use renv. The first thing I did was type the command install.packages('sf') and R returned the message below. How to proceed?

> install.packages('sf')
Error: package 'sf' is not available
In addition: Warning messages:
1: could not retrieve available packages for url "https://cran.rstudio.com/src/contrib" 
2: could not retrieve available packages for url "https://cran.rstudio.com/bin/windows/contrib/4.1" 
3: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - A função de revogação não pôde verificar a revogação do certificado. 
4: package 'sf' is not available 
5: failed to retrieve 'https://rstudio-buildtools.s3.amazonaws.com/renv/mran/packages.rds' [error code 35]
Igor
  • 145
  • 8
  • Your error message is saying the security certificates from the `renv` repository can't be verified and it is politely refusing to possibly infect your system with bad stuff. Looking at the system requirements for `sf`, do you have the various libs needed to compile `sf` in a R terminal session [what's needed](https://github.com/r-spatial/sf/blob/main/DESCRIPTION) – Chris Apr 17 '22 at 02:57
  • 1
    See also: https://rstudio.github.io/renv/articles/renv.html#downloads -- you might need to modify the download method used by renv. – Kevin Ushey Apr 21 '22 at 20:50
  • @KevinUshey Thank you for your help. That was the problem. – Igor Apr 22 '22 at 00:45

1 Answers1

1

As @KevinUshey pointed, I was able to download it with:

Sys.setenv(RENV_DOWNLOAD_FILE_METHOD = "libcurl")
Igor
  • 145
  • 8