4

I open RStudio and type

install.packages('rJava')

and it works fine.

Then I load package which has renv initialized and try the same command and it returns:

Error: package 'rJava' is not available
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. 
> 

What might be the reason?

Update

I decided to try something radical:

remove.packages('renv')

it and worked

but then I restarted R sessions and got back

# Bootstrapping renv 0.13.1 --------------------------------------------------
* Downloading renv 0.13.1 ... OK
* Installing renv 0.13.1 ... Done!
* Successfully installed and loaded renv 0.13.1.

Is there way to get rid of renv?

Another update:

I was able to deactivate renv with renv::deactive()

user1700890
  • 7,144
  • 18
  • 87
  • 183
  • 1
    Do you mean you load a *project* that has renv initialized, not a *package*? Check that you have rJava in renv's lockfile with the version you know works – camille Feb 17 '22 at 20:29
  • @camille, will do, but in my project with renv initialized I cannot install any packages. `install.packages('dplyr')` also failed – user1700890 Feb 17 '22 at 20:33
  • 1
    @user1700890 I'd suggest updating your question title to reflect that - "Can't install packages or remove renv" - it's a much more descriptive title than "Interesting issue" – Gregor Thomas Feb 17 '22 at 20:39
  • 1
    @user1700890 I think you can 'get rid of' the `renv` initialisation by getting rid of the call to `source(renv/activate.R)` inside your `.Rprofile` script. – Johnny Feb 18 '22 at 09:13
  • 1
    This is further documented at https://rstudio.github.io/renv/articles/renv.html#uninstalling-renv. – Kevin Ushey Feb 19 '22 at 01:07
  • 1
    FWIW I got similar error messages as from your first problem when running `renv::install` commands and fixed it by adding `RENV_DOWNLOAD_METHOD=libcurl` to `.Renviron`. Suggested by this GH issue: https://github.com/rstudio/renv/issues/735. – M. Rodo Apr 14 '22 at 06:00

0 Answers0