[R] Problems installing/updating packages in Linux
Prof Brian Ripley
ripley at stats.ox.ac.uk
Sat Feb 7 11:17:45 CET 2009
On Fri, 6 Feb 2009, Paul Heinrich Dietrich wrote:
> Hi all,
> I feel very comfortable with R in Windows, and am trying to switch over to
> Linux. I have R 2.8.1 on Linux and it works great (so far), except for
I suspect you didn't install it in any of the ways described in the
R-admin manual. An RPM or .deb, perhaps? If so, please give details
and ask on r-sig-fedora or r-sig-debian as appropriate.
> instalilng/updating packages. For example, using Emacs with ESS as a text
> editor, I entered:
> Here are some error messages:
> /usr/lib/R/bin/INSTALL: 1088: cannot create
> /usr/share/R/doc/html/search/index.txt: Permission denied
> The downloaded packages are in
> Updating HTML index of packages in '.Library'
> Warning messages:
> 1: In file.create(f.tg) :
> cannot create file '/usr/share/R/doc/html/packages.html', reason
> 'Permission denied'
> 2: In tools:::unix.packages.html(.Library) :
> cannot create HTML package index
> I thought this was a permissions-based issue, so I learned online that to
> grant permissions to everything in my R directories, to do this in the Linux
> chmod -R 777 ./directory
> And I applied that to several R directories, including /usr/lib/R and a
> place in /home where I store all my scripts, data sets, etc. I thought that
> would solve it, but I'm still getting the same permissions-based errors. I
> could really use some help from someone who knows Linux. Thanks.
It _is_ a permissions issue on /usr/share/R: note what the error
messages say about problematic file paths.
I suspect you are trying to update packages that shipped with R: you
are expected to do that under the account used to install R (probably
root in your case). We install software under a separate account (not
root, not any regular user) and that enables us to do autmated updates
safely using a crontab job run from that acccount.
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-help