0

I am trying to install the 'SnowballC' package in RStudio. I tried restarting R, clearing the environment, terminating all the sessions, and restarting and with a totally new session. But I keep getting this same error message:

package ‘SnowballC’ successfully unpacked and MD5 sums checked
Error in install.packages : ERROR: failed to lock directory ‘C:\Users\User\Documents\R\win-library\3.6’ for modifying
Try removing ‘C:\Users\User\Documents\R\win-library\3.6/00LOCK’

What is the solution?

Phil
  • 7,287
  • 3
  • 36
  • 66
Rashida
  • 401
  • 7
  • 18
  • 3
    Did you try going in and manually deleting the `C:\Users\User\Documents\R\win-library\3.6/00LOCK` file? You can use `unlink("C:\\Users\\User\\Documents\\R\\win-library\\3.6/00LOCK")` – MrFlick Apr 01 '21 at 03:11
  • @MrFlick I didn't wanna manually delete it because I tried once before and my total RStudio stopped working. I am scared to delete anything. – Rashida Apr 01 '21 at 03:28
  • The message is literally telling you to delete it. Something must have gone wrong in a pervious R session and that file didn't get cleaned up. If you are sure you are running no other R instances on your machine, it's safe to delete the lock file. – MrFlick Apr 01 '21 at 03:31

0 Answers0