Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

r

bioconductor

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)

like image 750
SirOsric Avatar asked Oct 29 '15 12:10

SirOsric


1 Answers

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.

like image 136
Konrad Rudolph Avatar answered Sep 25 '22 23:09

Konrad Rudolph