Unable to update "rlang"

Hello,

I need to use tidyverse for which I need rlang. I have rlang version 0.4.0. tidyverse needs version 0.4.1. So I tried to update. But every time following error shows up.

Warning in install.packages :
cannot remove prior installation of package ‘rlang’
Warning in install.packages :
problem copying C:\Users\kuldeep\Documents\R\win-library\3.6\00LOCK\rlang\libs\x64\rlang.dll to C:\Users\kuldeep\Documents\R\win-library\3.6\rlang\libs\x64\rlang.dll: Permission denied

What should I do?

2 Likes

Did you load rlang into memory before? Try starting completely new session and then try to install rlang before doing anything else.

Updating didn't work, no matter what I did.
So I removed rlang totally from my R and reinstalled again. That worked. I shouldn't have to do this though. I still dont know why I could not update.

It's do to a write permissions issue, if you run Rstudio as administrator you won't have that problem

I had the exact same issue just today. Running Rstudio with administrator rights did not solve the issue.

With me the problem was that my Rprofile loaded "usethis", "devtools", and "testthat" on startup. One or more of these packages loads "rlang", and this prevented "rlang" from being updated.

I solved it like this:

file.edit(file.path("~", ".Rprofile"))

Comment out all the loaded packages.
Restart session
install.packages("rlang")

I hope this helps.

6 Likes

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