开发者

error installing RandForestGUI (hence 'rgl', 'X11) in "R version 2.13.1 (2011-07-08)"

I have installed "R version 2.13.1 (2011-07-08)", over "Ubuntu 10.04 - Lucid Lynx". (I use RStudio 0.94.92), with all the headers needed to compile the many different packages I already installed. I got stuck with : install.packages("RandForestGUI"). Everything ran smoothly until

.....
* DONE (sciplot)
ERROR: dependency ‘rgl’ is not available for package ‘clusterSim’
* removing ‘/home/rs/R/i486-pc-l开发者_运维问答inux-gnu-library/2.13/clusterSim’
Warning in install.packages :
  installation of package 'clusterSim' had non-zero exit status
ERROR: dependency ‘clusterSim’ is not available for package ‘RandForestGUI’
* removing ‘/home/rs/R/i486-pc-linux-gnu-library/2.13/RandForestGUI’
Warning in install.packages :
  installation of package 'RandForestGUI' had non-zero exit status

I tried to : install.packages("rgl") but

Installing package(s) into ‘/home/rs/R/i486-pc-linux-gnu-library/2.13’
(as ‘lib’ is unspecified)
provo con l'URL 'http://rm.mirror.garr.it/mirrors/CRAN/src/contrib/rgl_0.92.798.tar.gz'
Content type 'application/x-gzip' length 1677772 bytes (1.6 Mb)
URL aperto
==================================================
downloaded 1.6 Mb

* installing *source* package ‘rgl’ ...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
….
checking for libpng-config... yes
configure: using libpng-config
configure: using libpng dynamic linkage
checking for X... no
configure: error: X11 not found but required, configure aborted.
ERROR: configuration failed for package ‘rgl’
* removing ‘/home/rs/R/i486-pc-linux-gnu-library/2.13/rgl’
Warning in install.packages :
  installation of package 'rgl' had non-zero exit status

Finally I tried : install.packages("X11") and

Installing package(s) into ‘/home/rs/R/i486-pc-linux-gnu-library/2.13’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘X11’ is not available (for R version 2.13.1)

... was stuck!.

Is it possible to have RandForestGUI in "R version 2.13.1 (2011-07-08)"? Many thanks, Roberto Scotti


Couple of rerequisites:

  • Use an R binary from the CRAN Ubuntu repository.
  • Do sudo apt-get install r-base-dev to complement your R environment for local package installation if you haven't already done so.
  • Then do sudo apt-get install r-cran-rgl as that is the hardest one to OpenGL headers.

Now try again with the RForestGUI package and its other dependants, and analyse the errors package by package.


The error indicates that you don't have the relevant X11 headers package for your OS. This is not an R package. You need to install that using whatever tools Ubuntu provides (as it is a Debian off-shoot, apt get should work, but there may be other, preferred techniques for adding packages to your OS.

The R Installation and Administration manual suggests that, for Debian, the relevant OS package needed is xorg-dev. Try installing that using your package manager in Ubuntu, and retry to install rgl inside R.

@Dirk Eddelbuettel will no doubt comment that there are pre-built packages in Ubuntu for many of R's packages or at least a meta-package for R Development that will make sure you have all the header packages for your OS available so you can build R packages at install time. I don't use Ubuntu or Debian so I cannot help with this aspect of your Q.


Had a similar problem for the clusterSim package in OS X.

Found the solution on the rstudio board:

X11 isn't installed by default on newer versions of OS X, so I had to install Quartz (the osx distribution of X11)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜