Issue regarding installation of packages

Hi I am encountering same error for every packages that i am installing. please help. My error is
package ‘bit’ successfully unpacked and MD5 sums checked
Error in install.packages : ERROR: failed to lock directory ‘C:\Users\jacob\OneDrive\Documents\R\win-library\3.6’ for modifying
Try removing ‘C:\Users\jacob\OneDrive\Documents\R\win-library\3.6/00LOCK’

R has problems with synced folders, I recommend you to set your user-leve package library in a non-synced folder or install into the system level package library instead. You can change the defaul location by setting your R_LIBS_SITE environmental variable on a .Reviron or .Rprofile file

# In .Renviron file you can set it this way (change the R version as needed). 
R_LIBS_SITE="C:\\Program Files\\R\\R-4.0.2\\library"

For a more detailed explanation, you can read this blog post

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.