Skip to content

update.packages() doesn't work anymore

3 messages · Michael M. Meyer, Peter Dalgaard, Martyn Plummer

#
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
---
A "quick" fix is to cp /usr/bin/R to /usr/lib/R/bin/R

 --Mike


Mike Meyer, Salter Point Associates, Seattle WA


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
"Michael M. Meyer" <mikem at salter-point.com> writes:
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.
#
Mea culpa.  Updated RPMS for Red Hat 6.2 and 7.0 (Intel)
which fix this problem are now up at

ftp://ftp-fis.iarc.fr/pub/R

and will be mirrored to CRAN shortly.
Martyn.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._