[Rd] install.packages on unix / su (PR#8760)
ripley at stats.ox.ac.uk
ripley at stats.ox.ac.uk
Tue Apr 11 08:19:42 CEST 2006
On Mon, 10 Apr 2006, Thomas Friedrichsmeier wrote:
>> | Wishlist item:
>> | There is a small problem using intall.packages() (and update.packages()):
>> | Typically I want to install packages for system-wide use, not in a user
>> | directory. Obviously this does not work without superuser rights.
[From a reply I started last night.]
Not obvious at all, especially to those of us who do it all the time.
Many of us set up an account to `own' R, and either install under that
account or change the ownership of the library directory to that account.
I think what you suggest is quite dangerous, as different directories may
be visible to the user account producing the summary information and to
root. Then update.packages() (run by you) and R CMD INSTALL (run by root)
may do different things. This could apply both within a library directory
(root might have installed a later version of a package not readable by
you) and over different library trees (my personal R library is not
readable by root, and indeed the main R library tree is not readable by
root on our student's machines).
Quoting someone else (without attribution, a breach of copyright)
>> One can see this problem as a local system management issue for which
>> another possible answer is to add you (and/or the user users installing R
>> packages) to, say, group 'admin' and to make /usr/local/lib/R of group
>> admin and group-writeable. Or create a custom group radmin. Or ...
> It's about convenience, no more, no less, and so it's a wishlist item, no
> more, and no less.
> I don't think the case of a non-root user working on a de-facto single user
> system is too uncommon on linux. It's why tools like kdesu exist in the first
> place. Unless there are strong reasons not to (and there may well be), I
> think adding some convenience option for this particular case may well be
> worth while.
See the `strong reason' above. Two of us have suggested better solutions.
If you want yours, you can of course patch your installation, the beauty
of Open Source. But unless you can find an R-core member who is prepared
to maintain your solution, it will not be going into R.
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel