3

我已经在“Ubuntu 10.04 - Lucid Lynx”上安装了“R 版本 2.13.1 (2011-07-08)”。(我使用 RStudio 0.94.92),其中包含编译我已经安装的许多不同包所需的所有头文件。我被卡住了: install.packages("RandForestGUI")。一切顺利,直到

.....
* DONE (sciplot)
ERROR: dependency ‘rgl’ is not available for package ‘clusterSim’
* removing ‘/home/rs/R/i486-pc-linux-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

我试图:install.packages("rgl") 但是

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

最后我尝试了:install.packages("X11")

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)

...被卡住了!

是否可以 在“R 版本 2.13.1 (2011-07-08)”中使用RandForestGUI ?非常感谢,罗伯托斯科蒂

4

3 回答 3

5

几个先决条件:

  • 使用CRAN Ubuntu 存储库中的 R 二进制文件。
  • sudo apt-get install r-base-dev如果您还没有这样做,请补充您的 R 环境以进行本地软件包安装。
  • 然后这样做 sudo apt-get install r-cran-rgl是对 OpenGL 标头最难的一个。

现在再次尝试使用RForestGUI包及其其他依赖项,并逐个包分析错误。

于 2011-07-27T11:58:06.613 回答
2

该错误表明您的操作系统没有相关的 X11 标头包。这不是R 包。您需要使用 Ubuntu 提供的任何工具来安装它(因为它是 Debian 的分支,apt get应该可以工作,但可能还有其他首选技术可以将软件包添加到您的操作系统。

R 安装和管理手册建议,对于 Debian,所需的相关操作系统包是xorg-dev. 尝试使用 Ubuntu 中的包管理器安装它,然后重试在 R 中安装rgl

@Dirk Eddelbuettel 毫无疑问会评论说,Ubuntu 中有许多 R 包的预构建包,或者至少有一个用于 R 开发的元包,这将确保您拥有适用于您的操作系统的所有头包,以便您可以构建 R安装时的软件包。我不使用 Ubuntu 或 Debian,所以我无法帮助您解决 Q 的这方面问题。

于 2011-07-27T09:10:51.033 回答
0

OS X 中的 clusterSim 包也有类似的问题。

在rstudio 板上找到了解决方案:

X11 没有默认安装在较新版本的 OS X 上,所以我必须安装Quartz(X11 的 osx 发行版)

于 2017-06-08T02:35:58.037 回答