[R-sig-Debian] Rscript in R-2.5.0 on Ubuntu/dapper

Dirk Eddelbuettel edd at debian.org
Wed May 2 22:25:11 CEST 2007


Stephen,

I hope you don;t mind that I am ccing this to the r-sig-debian list. In the
future, please consider asking there, in particular for Ubuntu.

On 2 May 2007 at 15:56, Stephen B. Weston wrote:
| Dirk,
| 
| I just downloaded and installed the .deb files for R-2.5.0
| for my Ubuntu/Dapper machine from:
| 
|    http://lib.stat.cmu.edu/R/CRAN/bin/linux/ubuntu/dapper/
| 
| I admit that I didn't read any instructions, but I thought
| I got it installed easily enough.  Then I decided to try
| out the new Rscript program.  I tried it on a script,
| and got the following error message:
| 
|    Rscript execution error: No such file or directory
| 
| but it didn't seem to be referring to my script.

It's bug somewhere between R and Debian. R doesn't follow one particular GNU
convention for path setting at 'make install' time. Martyn Plummer, the R
Core member who also maintains the RPM builds, noticed it. It has do with how
R is built and installed.  As Rscript was not released prior to R 2.5.0 (and
its prereleases), nobody had noticed.  This will now be corrected in R
upstream; not sure if it will happen before R 2.5.1.

Martyn provided a patch which I tested at work (on Ubuntu). I plan to
released updated R packages for Debian.

If you get really lucky, the volunteer maintainers who maintain the "ports"
of my Debian package at CRAN may build updated packages too. If not, you may
have to wait until R 2.5.1.

| So I downloaded the source, and noticed that Rscript is
| using the RHOME environment variable to find the R executable.
| That isn't set on my machine, but when I set it, it worked.

That is precisely the problem -- RHOME gets a bad value, and Martyn's patch
fixes this (and a few related issues).
| 
| I was also puzzled that Rscript is installed in the
| usr/bin/X11 directory.  Is there supposed to be a wrapper
| script for Rscript that sets RHOME?  Did I mess something
| up when I installed R-2.5.0?

Not for me. Ends up in /usr/bin, so can't help here.

| It doesn't make much difference to me, but I thought I
| would mention this to you in case it's a packaging error.
| I was under the impression that Debian-type installations
| aren't supposed to use external environment variables.

Correct. It's simply a related bug which we'll fix.

Luckily not too many other things are affected.  The pkg-config file
/usr/lib/libR.pc also needs fixing (and is addressed by Martyn's patch). 
But nothing uses that yet, so no harm done (yet).

Lastly, as author of littler [ which is another R script frontend ] I may
also offer my biased advice to use littler, at least while Rscript is still
buggy or broken. I reported another Rscript issue to Prof Ripley. 

Thanks for the heads-up.

Dirk

-- 
Hell, there are no rules here - we're trying to accomplish something. 
                                                  -- Thomas A. Edison



More information about the R-SIG-Debian mailing list