From: http://r.789695.n4.nabble.com/install-packages-fails-if-libPaths-set-tp4647797p4647954.html Reproducible example: 1. Create directory ~/rlibtest mkdir ~/rlibtest 2. Create ~/.Renviron with the contents "R_LIB=~/rlibtest" echo "R_LIBS=~/rlibtest" > .Renviron 3. Start R and run the following code: dir.create("test") .libPaths("test") install.packages("relations", type = "source") Installing the 'relations' package should also install the dependencies 'sets' and 'slam'. But the result here is that only 'sets' is installed into ~/test. I believe this is because relations depends on sets, but the installation of relations has the wrong libpaths and so it can't find sets. (Output is included below) If you remove the .Renviron file and run the same code, installation works fine. I think this problem happens when: - R_LIBS is set - The current value of R_LIBS is not in .libPaths() =================================================== Output from running the installation with .Renviron file present =================================================== > dir.create("test") > .libPaths("test") > install.packages("relations", type = "source") Installing package(s) into ‘/home/ubuntu/test’ (as ‘lib’ is unspecified) also installing the dependencies ‘sets’, ‘slam’ trying URL 'http://cran.rstudio.com/src/contrib/sets_1.0-12.tar.gz' Content type 'application/x-gzip' length 488837 bytes (477 Kb) opened URL ================================================== downloaded 477 Kb trying URL 'http://cran.rstudio.com/src/contrib/slam_0.1-26.tar.gz' Content type 'application/x-gzip' length 39506 bytes (38 Kb) opened URL ================================================== downloaded 38 Kb trying URL 'http://cran.rstudio.com/src/contrib/relations_0.6.tar.gz' Content type 'application/x-gzip' length 493292 bytes (481 Kb) opened URL ================================================== downloaded 481 Kb * installing *source* package ‘sets’ ... ** package ‘sets’ successfully unpacked and MD5 sums checked ** libs gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -O3 -pipe -g -c closure.c -o closure.o gcc -std=gnu99 -shared -o sets.so closure.o -L/usr/lib/R/lib -lR installing to /home/ubuntu/test/sets/libs ** R ** data ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ‘sets.Rnw’ ** testing if installed package can be loaded * DONE (sets) * installing *source* package ‘slam’ ... ** package ‘slam’ successfully unpacked and MD5 sums checked ** libs gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -O3 -pipe -g -c grouped.c -o grouped.o gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -O3 -pipe -g -c sparse.c -o sparse.o gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -O3 -pipe -g -c util.c -o util.o gcc -std=gnu99 -shared -o slam.so grouped.o sparse.o util.o -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR installing to /home/ubuntu/test/slam/libs ** R ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded * DONE (slam) * installing *source* package ‘relations’ ... ** package ‘relations’ successfully unpacked and MD5 sums checked ** R ** data ** moving datasets to lazyload DB ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ‘relations.Rnw’ ** testing if installed package can be loaded Error : package ‘sets’ required by ‘relations’ could not be found Error: loading failed Execution halted ERROR: loading failed * removing ‘/home/ubuntu/test/relations’ The downloaded source packages are in ‘/mnt/tmp/Rtmp60g9Qf/downloaded_packages’ Warning message: In install.packages("relations", type = "source") : installation of package ‘relations’ had non-zero exit status
This problem happens on Linux (Ubuntu 12.04) and Mac OS (10.8) for me.
What is the status of this bug now?