[R] /usr/local/lib/R/site-library is not writable
Jan van der Laan
rhe|p @end|ng |rom eoo@@dd@@n|
Thu Apr 8 15:18:38 CEST 2021
I would actually go a step in the other direction: per project
libraries. For example by adding a .Rprofile file to your project
directory. This ensures that everybody working on a project uses the
same version of the packages (even on different machines e.g. on shared
folders).
This can give issues when a new version of R arrives, but that is
usually easy to solve. Either hard code the path to the old R-version or
decide to update all packages in a project to the new R-version (and
test that everything is still working ok).
We have the most often used packages installed centrally on the
server/network, so I actually usually end up with a mixture of central,
personal and project libraries. Theory vs practice.
HTH,
Jan
On 08-04-2021 02:58, Dirk Eddelbuettel wrote:
> Hi Gene,
>
> "It's complicated". (Not really, but listen for a sec...)
>
> We need to ship a default policy that makes sense for all / most
> situations. So
>
> - users cannot write into /usr/local/lib/R/site-library -- unless they are
> set up to, but adding them to the 'group' that owns that directory
>
> - root can (but ideally one should not run as root as one generally does not
> now what code you might get slipped in a tar.gz); but root can enable users
>
> - so we recommend letting (some or all) users write there by explicitly
> adding them to an appropriate group.
>
> Personally, I do not think personal libraries are a good idea on shared
> machines because you can end up with a different set of package (versions)
> than your colleague on the same machine. And or you running shiny from $HOME
> have different packages than shiny running as server. And on and on. Other
> people differ, and that is fine. If one wants personal libraries one can.
>
> I must have explained the reasoning and fixes a dozen times each on
> r-sig-debian (where you could have asked this too) and StackOverflow. At
> least the latter can be searched so look at this set:
> https://stackoverflow.com/search?q=user%3Ame+is%3Aanser+%2Fusr%2Flocal%2Flib%2FR%2Fsite-library
>
> Happy to take it offline too, and who knows, we even get to meet for a coffee
> one of these days.
>
> Hope this helps, Dirk
>
More information about the R-help
mailing list