Skip to content

Rscript path problem on R 2.13.1 for Ubuntu 11.04?

3 messages · Johan Nylander, Syrus Nemat-Nasser, Michael Rutter

#
Dear all,

finally decided to do an Ubuntu upgrade and a new clean R install from
http://cran.r-project.org/bin/linux/ubuntu/.

However, while trying to install a package from R-forge I encountered
problems, involving error messages saying "Rscript execution error: No
such file or directory" (see below).

The same procedure works on Ubuntu 11.04 running R 2.12.1-1 from the
Ubuntu repositories.

The behavior of Rscript on my (11.04 + 2.13.1) machine:
  $ which Rscript
  /usr/local/bin/Rscript
  $ Rscript --version
  R scripting front-end version 49838
  $ Rscript -e 'rnorm(1)'
  Rscript execution error: No such file or directory

on my 11.04 + 2.12.1:
  $ which Rscript
  /usr/bin/Rscript
  $ Rscript --version
  R scripting front-end version 2.12.1 (2010-12-16)
  $ Rscript -e 'rnorm(1)'
  [1] 0.9278564

Seems like this problem has been seen before
(http://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14493), and that the
wrong PATH and/or RHOME is involved.

Any suggestions? Solutions?

Cheers
Johan

--------------------------------------------
Install Error output (On Ubuntu Linux 11.04 64bit, R version 2.13.1
(2011-07-08). R installed from CRAN Ubuntu bin repositories.)

$ sudo R
Installing package(s) into ?/usr/local/lib/R/site-library?
(as ?lib? is unspecified)
trying URL
'http://R-forge.R-project.org/src/contrib/earthmovdist_0.1.1.tar.gz'
Content type 'application/x-gzip' length 15819 bytes (15 Kb)
opened URL
==================================================
downloaded 15 Kb

* installing *source* package ?earthmovdist? ...
** libs
g++ -I/usr/share/R/include  
-I"/usr/local/lib/R/site-library/Rcpp/include"   -fpic  -O3 -pipe  -g -c
emdL1.cpp -o emdL1.o
g++ -I/usr/share/R/include  
-I"/usr/local/lib/R/site-library/Rcpp/include"   -fpic  -O3 -pipe  -g -c
emdL1_R.cpp -o emdL1_R.o
Rscript execution error: No such file or directory
Rscript execution error: No such file or directory
g++ -shared -o earthmovdist.so emdL1.o emdL1_R.o -L/usr/lib64/R/lib -lR
installing to /usr/local/lib/R/site-library/earthmovdist/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object
'/usr/local/lib/R/site-library/earthmovdist/libs/earthmovdist.so':
  /usr/local/lib/R/site-library/earthmovdist/libs/earthmovdist.so:
undefined symbol: _ZTIN4Rcpp7RObjectE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ?/usr/local/lib/R/site-library/earthmovdist?

The downloaded packages are in
        ?/tmp/RtmpdFcoSz/downloaded_packages?
Warning message:
In install.packages("earthmovdist", repos = "http://R-forge.R-project.org") :
  installation of package 'earthmovdist' had non-zero exit status
#
On 09/19/2011 09:54 AM, Syrus Nemat-Nasser wrote:
When I look at my installed files list for r-base-core (2.13.1-1lucid2), 
it lists the following:

/usr/bin/Rscript

Johan, did you do an upgrade to 11.04 or a clean install of 11.04? 
Upgrades from one release of Ubuntu to another can sometimes cause 
strange issues.  This could a side effect of doing an upgrade.

Are there any other R related programs in /usr/local/bin?  What is 
strange is that when I ask for the version of Rscript, I get

 > Rscript --version
R scripting front-end version 2.13.1 (2011-07-08)

I am not even sure where "version 49838" is coming from.  It seems to be 
to a leftover file from another install.  Is Rscript also in /usr/bin? I 
would delete the /usr/local/bin/Rscript manually, and then reinstall R.

Michael