unable to install stringr

Hi, I am new learner of Rstudio.
I am trying to install “stringr" package. However, I always encounter this error:

ERROR: failed to lock directory 'C:/Program Files/R/R-3.6.2/library' for modifying Try removing 'C:/Program Files/R/R-3.6.2/library/00LOCK-stringi' Warning in install.packages : installation of package ‘stringi’ had non-zero exit status

Can anyone help me with this? Thank you very much in advance.

I have you tried removing the file
C:/Program Files/R/R-3.6.2/library/00LOCK-stringi

You may have to make hidden objects visible, which I believe is an option in the View menu.

Also, have in mind that you need to run RStudio as administrator to be able to install in this library path.

1 Like

thank you very much.
I deleted the file you mentioned and reinstalled package successfully.

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