Chris Evans
2011-Sep-20 20:20 UTC
[R-sig-Debian] update.packages() as ordinary user, /usr/lib/R/site-library is not writable
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. 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: 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 Although all the compilations have run through, presumably with errors for rgl and XML, clearly the "not writable" status of /usr/lib/R/library 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. 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
Dirk Eddelbuettel
2011-Sep-20 20:37 UTC
[R-sig-Debian] update.packages() as ordinary user, /usr/lib/R/site-library is not writable
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
Dirk Eddelbuettel
2011-Sep-20 20:57 UTC
[R-sig-Debian] update.packages() as ordinary user, /usr/lib/R/site-library is not writable
Also, as an aside, R should not have tried to write to /usr/lib/R/site-library. Via the file /etc/R/Renviron, we define the library path. You should see this in R: R> .libPaths() [1] "/usr/local/lib/R/site-library" "/usr/lib/R/site-library" "/usr/lib/R/library" R> and /usr/local/lib/R/site-library as the 1st directory in this path should be the one being written too. You can then make that very directory writeable by you (my preference) or run the install step as root in R (more clumsy in my book). Dirk -- 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
Reasonably Related Threads
- Problem updating packages in 2.15.1 on Ubuntu 12.04
- Oddity with internet access and R 11.0 with Sophos firewall and Windoze XP - solved
- Oddity: I seem to have a variable in a dataframe that doesn't show in colnames() - can anyone advise?
- Upgrading
- packages MANOR, qvalue, and tkWidgets fail install on Fedora 7 with latest R-beta build