Hide Forgot
Description of problem: Usually R CMD INSTALL should install a package in ~/R/... if run without admin rights. Current version tries to install on /usr/lib(64)/R/... Version-Release number of selected component (if applicable): $ rpm -q R R-2.13.1-4.fc14.x86_64 How reproducible: Always Steps to Reproduce: 1. wget http://bioconductor.org/packages/2.8/bioc/src/contrib/a4_1.1.2.tar.gz 2. R CMD INSTALL a4_1.1.2.tar.gz Actual results: $ R CMD INSTALL Download/a4_1.1.2.tar.gz * installing to library ‘/usr/lib64/R/library’ Error: ERROR: no permission to install to directory ‘/usr/lib64/R/library’ Expected results: Install a4 in the home directory. Additional info:
R CMD INSTALL, by default, installs packages in the library tree rooted at the first directory in .libPaths() for an R session run in the current environment .libPaths is used for getting or setting the library trees that R knows about (and hence uses when looking for packages). The library search path is initialized at startup from the environment variable R_LIBS (which should be a colon-separated list of directories at which R library trees are rooted) followed by those in environment variable R_LIBS_USER. Only directories which exist at the time will be included. By default R_LIBS is unset, and R_LIBS_USER is set to directory ‘R/R.version$platform-library/x.y’ of the home directory, for R x.y.z. Or, to put it succinctly, R CMD INSTALL doesn't see the ~/R/x86_64-redhat-linux-gnu-library/2.13/ directory (because it doesn't exist). If you create it, it should show up in the .libPaths() and R CMD INSTALL should prefer it. Before: > .libPaths() [1] "/usr/lib64/R/library" "/usr/share/R/library" > Create Directory: [spot@pterodactyl ~]$ mkdir -p ~/R/x86_64-redhat-linux-gnu-library/2.13/ After: > .libPaths() [1] "/home/spot/R/x86_64-redhat-linux-gnu-library/2.13" [2] "/usr/lib64/R/library" [3] "/usr/share/R/library"