简体   繁体   中英

'lib = "/usr/lib/R/library"' is not writable" while installing R Bioconductor package

everyone. I'm trying to install Bioconductor package "cummeRbund" and constantly fail. I've tried biocLite("cummeRbund") command with BiocInstaller enabled, install.packages("cummeRbund") and their variations with specified library address. The result is always

"Warning in install.packages(update[instlib == l, "Package"], l, contriburl = contriburl,  :
  'lib = "/usr/lib/R/library"' is not writable"

and r keeps offering me to use personal directory. What should I do to get rid of this pesky issue ("cummeRbund" is not the only one package that keeps failing to install)?

My specs.: Ubuntu 14.04 LTS 64-bit, R version 3.2.2 (2015-08-14) -- "Fire Safety", Bioconductor version 3.2 (BiocInstaller 1.20.0)

It's not uncommon that R's default library path is unwriteable for the current user. This usually means that R was installed by a different user. This isn't a problem in itself. Just configure R to use a different library path.

To do this, set the R_LIBS_USER environment variable. To preserve it across shell sessions, set the value in ~/.profile or similar.

export R_LIBS_USER=/path/to/your/r-library

There's a detailed description of this solution in another answer .

Another solution is to install software for each user separately. This especially makes sense on a non-shared system. Most package managers support installing software for the local user, without super user rights. In particular, Homebrew does that by default, and strongly recommends against using sudo to install software.


I installed R version 3.3.0 on another OS : No ``cummeRbund´´ install issues.

Got the "3.3.0" with $ svn co https://svn.r-project.org/R/trunk/ ( svn ver. 69583 ).



»» R keeps offering me to use personal directory. What should I do to get rid of this pesky issue ««

Simple : Open a terminal window and use the command $ sudo R ( not $ R ), when you want to install an R package.


R, version 3.2.2 :

> source("http://bioconductor.org/biocLite.R")
biocLite()

> biocLite(c("cummeRbund"))

Ref.https://www.bioconductor.org/install/

No issues here with getting the package. ( Not sure it can be installed : Dependency issues.)

( I used Ubuntu 15.10 - 64 . Easier : The default R is version 3.2.2 ).


The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM