[R-sig-Debian] update.packages() as ordinary user, /usr/lib/R/site-library is not writable

Dirk Eddelbuettel edd at debian.org
Tue Sep 20 22:37:30 CEST 2011


Welcome!

On 20 September 2011 at 21:20, Chris Evans wrote:
| I am moving from windoze on a Dell laptop to Debian but I seem to have 
| hit a snag for R.  I managed to find the information to point an 
| /etc/apt/sources.list entry at my local CRAN repository and have 
| installed R 2.13.1 for squeeze from the Bristol UK repository.

Good so far.
 
| I  installed a number of the additional R packages using synaptic which 
| reported no errors but when I run my first update.packages() as an 
| ordinary user I get this:

*Every* interaction with the package management system in Debian or Ubuntu
has to happen as root.  So do NOT say 'synaptic', say 'sudo synaptic'.
 
| The downloaded packages are in
| 	‘/tmp/Rtmp9LYziU/downloaded_packages’
| Warning in install.packages(update[instlib == l, "Package"], l, 
| contriburl = contriburl,  :
|    'lib = "/usr/lib/R/library"' is not writable
| Error in install.packages(update[instlib == l, "Package"], l, contriburl 
| = contriburl,  :
|    unable to install packages
| In addition: Warning messages:
| 1: In install.packages(update[instlib == l, "Package"], l, contriburl = 
| contriburl,  :
|    installation of package 'rgl' had non-zero exit status
| 2: In install.packages(update[instlib == l, "Package"], l, contriburl = 
| contriburl,  :
|    installation of package 'XML' had non-zero exit status

If you get this, and think you used synaptic, you're confused.

Synaptic gets you prebuilt binaries from the repos it knows about.

What you show here is local compilation, possibly triggered by R. Not at all
the same.
 
| Although all the compilations have run through, presumably with errors 
| for rgl and XML, clearly the "not writable" status of /usr/lib/R/library 

Both r-cran-rgl and r-cran-xml exists _as pre-built binaries_. See above, do
not build them locally unless you have to AND know how to.

| has genuinely prevented the update.
| 
| I thought I'd seen strong advice here recently against updating 
| libraries as root so I'm intrigued about this.  Can someone advise me 
| what I should do?
| 
| Thanks in advance and huge thanks to all who do the porting to Debian 
| and generally make R so good.

It works actually really well indeed, but it is still on Linux / Unix --
which is a whole new world onto itself for people just joining.  As the joke
goes: "Unix is user-friendly, but it is picky about its friends."

Is there a local user group or a colleague you could bug locally?

Dirk
 
| Chris
| 
| -- 
| Chris Evans <chris at psyctc.org> Skype: chris-psyctc
| Consultant Psychiatrist in Psychotherapy, Notts. PDD network;
| Professor, Psychotherapy, Nottingham University
| *If I am writing from one of those roles, it will be clear. Otherwise*
| *my views are my own and not representative of those institutions    *
| If you have difficulty Emailing me on this address or getting a reply,
| send again but cc to:       chris dot evans at nottshc dot nhs dot uk
| and to:                     c dot evans at nottingham dot ac dot uk
| 
| _______________________________________________
| R-SIG-Debian mailing list
| R-SIG-Debian at r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-debian

-- 
New Rcpp master class for R and C++ integration is scheduled for 
San Francisco (Oct 8), more details / reg.info available at
http://www.revolutionanalytics.com/products/training/public/rcpp-master-class.php



More information about the R-SIG-Debian mailing list