[R] update.packages() doesn't work anymore

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Wed Jan 24 23:48:24 CET 2001


"Michael M. Meyer" <mikem at salter-point.com> writes:

> install.packages want to run
>    cmd <- paste(file.path(R.home(), "bin", "R")
> (which on my system is /usr/lib/R/bin/R).
> 
> Unfortunately ( and this is R 1.2.1, installed from the rpm on CRAN) 
> that shell script has /var/tmp/R-base-root/usr/lib/R hard coded as the 
> R_Home.
> 
> Here is the diff between /usr/bin/R and /usrlib/R/bin/R.
> 
> ->meyer<-:/usr/lib/R/bin> diff /usr/lib/R/bin/R /usr/bin/R
> 4c4
> < R_HOME_DIR=/var/tmp/R-base-root/usr/lib/R
> ---
> > R_HOME_DIR=/usr/lib/R
> 
> A "quick" fix is to cp /usr/bin/R to /usr/lib/R/bin/R
> 

Or fix the shell script (which amounts to the same). I think this
happens when the RPM build installs in an alternate dir and later
adjusts things for the final location. A regular install has:

[pd at blueberry pd]$ R RHOME
/usr/local/lib/R
[pd at blueberry pd]$ cat `R RHOME`/bin/R
#!/bin/sh
# Shell wrapper for R executable.

R_HOME_DIR=/usr/local/lib/R
if test -n "${R_HOME}" && \
...

and no output from
[pd at blueberry pd]$ diff `which R` `R RHOME`/bin/R

We changed the use of the R_HOME environment variable recently (I
forget whether it was for 1.2.0 or 1.2.1) on the premise that the
startup script is really version dependent and good things couldn't be
expected to come from calling an old R script with a new R_HOME
setting and that R itself ought to be able to keep track of its
installation directory...

The old way probably prevented a wrong R_HOME setting in
/usr/lib/R/bin/R from having any effect. (Anyone with an older R
installed from an RPM want to try "/usr/lib/R/bin/R RHOME"?) The fix
is probably to have Martyn modify the spec file and rebuild the RPM.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list