[R] /usr/local/lib/R/site-library is not writable
jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Thu Apr 8 00:45:31 CEST 2021
1. Use a personal library. Mucking with the default library puts you at risk of changing file permissions on your personal files inadvertently and making them unusable by your normal user. Even if you did alter your user permissions so you could mess with it without elevating privileges, POSIX is designed as a multi-user system and the other users will generally not like having shared packages changed without their knowledge.
2. The default library is where R goes looking if you don't have the desired package in your personal package. It is normally updated only when the R software is updated.
On April 7, 2021 12:40:04 PM PDT, Gene Leynes <gleynes using gmail.com> wrote:
>Hello R Community,
>I've been using R for a long time, and this is a question that still
>me think twice every single time I install R, which is more and more
>The first search hit is this StackOverflow question:
>The warning message hasn't changed over the years:
>Installing package into ‘/usr/local/lib/R/site-library’
>(as ‘lib’ is unspecified)
>Warning in install.packages :
> 'lib = "/usr/local/lib/R/site-library"' is not writable
>In this question they suggest using the personal library, which is what
>end up doing as well, but some people suggest changing your group.
>actually seems like the right answer to me, but others say they had
>problems when they changed groups, which also sounds about right.
>Can someone please tell me (or tell StackOverflow) the real best
>I've gotten into some very thorny issues with installations that can't
>any library when I deploy jobs using cron or other users, and it's hard
>remember / figure out how to install (if missing) libraries in the
>because it's hard to remember the mirror syntax.
>I know there's a packrat package, and I've invented some workarounds,
>I normally just need two or three stable packages for a particular
>I'd bet that .libPaths would be implemented differently today, but
>with the right library path none of that would be necessary to
>My final simplified questions are:
> 1. What is the best practice to install libraries so that the current
> user (Linux) can always find them?
> 2. Why is the default library path not writable by default, should we
> change that?
>Hope everyone's doing well out there, and I hope to see some of you at
>conferences when things get back to normal.
> [[alternative HTML version deleted]]
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.
Sent from my phone. Please excuse my brevity.
More information about the R-help