Error: install.packages failed to lock directory

when I install packages in R studio, it often indicates as below and not installed successfully.

Error in install.packages : ERROR: failed to lock directory ‘C:\Program Files\R\R- 3.6.1\library’ for modifying 
Try removing ‘C:\Program Files\R\R-3.6.1\library/00LOCK’

could someone tell me how to solve this problem?thx a lot.

hello,I came across the same problem with you. Then follow with the instruction: find the file:‘C:\Program Files\R\R-3.6.1\library/00LOCK’, delete the file"00LOCK" then it works again.

1 Like

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