Restore library location after upgrading to R 4.0

The company I work for used R Studio Server to have shared libraries and when we upgraded from 3.6 to 4.0 some of the library permissions seem to be messed up. There are 2 main problems .

  1. I can no longer install packages at '/usr/lib/R/site-library' when I try I get it's not writable.
  2. RStudio removed the site library install package UI despite it still being in .libPaths()

We need to be able to have a common library location all users can add packages too since we are a small group.

Can't write to site library code example

install.packages("dplyr", "/usr/lib/R/site-library")
# Error in install.packages : unable to install packages

.libPath return

"/home/user/R/x86_64-pc-linux-gnu-library/4.0" "/usr/lib/R/site-library"                       

The RStudio UI only has the personal library location in the dropdown, but not the other library locations used by production.


You can either set broad permissions on the folder (777) or create a group with appropriate permissions and make all your RStudio users part of that group (775)

1 Like

I think your organisation should consider adopting renv
CRAN - Package renv (
This lets you track versions used in projects, and can support a sitewide renv cache