tags:

views:

125

answers:

1

I'm trying to install Rcpp on Ubuntu 10.04 and getting this error (which implies that it doesn't exist):

> install.packages("Rcpp")
Warning in install.packages("Rcpp") :
  argument 'lib' is missing: using '/home/vadmin/R/i486-pc-linux-gnu-library/2.10'
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
  package ‘Rcpp’ is not available

I have a working R instance and have installed many other packages.

Edit

Now I'm getting this error when running R CMD build Rcpp on the source code off svn:

** building package indices ... Error : running Stangle on vignette '/home/vadmin/src/R/rcpp/pkg/Rcpp/inst/doc/Rcpp-modules.Rnw' failed with message: invalid value for 'lang' : cpp ERROR: installing package indices failed * removing ‘/tmp/Rinst3041838816/Rcpp’ ERROR Installation failed.

+1  A: 

A few things:

  • thanks for your interest in Rcpp :-)

  • it has been on CRAN as Rcpp for years; if you get a Rcpp not available error then you are looking at a bad CRAN mirror and I suggest using a different one

  • Ubuntu also has their Rcpp version of the Rcpp Debian package so you could just do 'sudo apt-get install r-cran-rcpp' (but that may be a dated version, alas)

In general, Romain and I suggest for Rcpp questions to come to the rcpp-devel list.

Dirk Eddelbuettel
Thanks Dirk! Great work on the package. I'll direct my questions ot the listserve in the future. I tried 3 different mirrors (PA (1), OH, and CA (1)) and I get the same error. I also tried building it from source and it fails on this: `Rscript -e "tools::texi2dvi( 'Rcpp-unitTests.tex', pdf = TRUE, clean = TRUE )"Error in tools::texi2dvi("Rcpp-unitTests.tex", pdf = TRUE, clean = TRUE) : Running 'texi2dvi' on 'Rcpp-unitTests.tex' failed.`
griffin
That is bad on the mirror. I usually use cran.us.r-project.org which is actually in Seattle and not close -- but usually current. As for failing with source: you probably miss dependencies, but you are in luck on Ubuntu: use `sudo apt-get build-dep r-cran-rcpp` and try again.
Dirk Eddelbuettel
@Dirk: I think SO/SuperUser are much better places for questions like this because they cast a much wider net. Your answer here (and SO rep. score) is evidence that there is plenty of R expertise to be had here.
Drew Hall
Drew: Rcpp has a handful of core users; they are on the list. Had I not answered this question here, it would have died ... whereas someone else would have answered on the list.
Dirk Eddelbuettel
@Dirk: Wow...this is frustrating. I tried `install.packages("Rcpp", repos="http://cran.us.r-project.org")` and I get the same issue. And I also did `sudo apt-get build-dep r-cran-rcpp`, but R CMD install still doesn't work for me (using latest off SVN). I'll keep plugging away.
griffin
Do you have texi2dvi installed?
Dirk Eddelbuettel
@Dirk: Thanks! I did have texti2dvi installed, but tex wasn't properly set up. Now I get this: ! LaTeX Error: File `vmargin.sty' not found.
griffin
It's in one of the texlive packages. It shouldn't rebuild the pdf, this is a bit odd.
Dirk Eddelbuettel
That's because I'm building from source. I still haven't been able to install with install.packages. Used `sudo apt-get install texlive-latex-extra` to solve that problem. Thanks!
griffin