Re: [Rd] install.packages() fails if .libPaths() set

From: Winston Chang <>
Date: Tue, 30 Oct 2012 19:12:22 -0500

It appears that this problem only happens when R_LIBS is specified in ~/.Renviron. When it compiles 'relations', it's somehow not passing along the correct lib paths.

This is the test code:
install.packages("relations", type = "source")

The 'relations' package depends on 'sets' and 'slam'. When there is no ~/.Renviron file it works: all three packages get installed into test/.

The story is different when there is an file ~/.Renviron with the contents: R_LIBS=~/R (And the ~/R directory exists, of course.)

It manages to install 'sets' and 'slam' into test/, but it fails to install 'relations'. I've added the output to the bottom of this email.

I test this with R 2.15.1 and R 2.15.2 on Windows XP, and R 2.15.1 on Mac OS X 10.7.5. In all cases, I get the same result.

Here's the output when there _is_ an .Renviron file:

> install.packages("relations", type = "source") Installing package(s) into ‘C:/Documents and Settings/user/My Documents/test’ (as ‘lib’ is unspecified)
also installing the dependencies ‘sets’, ‘slam’

trying URL '' Content type 'application/x-gzip' length 283388 bytes (276 Kb) opened URL
downloaded 276 Kb

trying URL '' Content type 'application/x-gzip' length 39506 bytes (38 Kb) opened URL
downloaded 38 Kb

trying URL '' Content type 'application/x-gzip' length 493292 bytes (481 Kb) opened URL
downloaded 481 Kb

The downloaded source packages are in
‘C:\Documents and Settings\user\Local
Settings\Temp\RtmpGSxf4J\downloaded_packages’ mailing list Received on Wed 31 Oct 2012 - 01:36:58 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 31 Oct 2012 - 18:00:49 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive