2011-07-27 45 views
3

我已經安裝了「R version 2.13.1(2011-07-08)」, Ubuntu 10.04 - Lucid Lynx「。 (我使用RStudio 0.94.92),以及編譯已安裝的許多不同軟件包所需的所有頭文件。 我被卡住了:install.packages(「RandForestGUI」)。一切都順利跑了直到在「R version 2.13.1(2011-07-08)」中安裝RandForestGUI(因此'rgl','X11)錯誤

..... 
* 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 version 2.13.1(2011-07-08)」中可能有RandForestGUI? 非常感謝,羅伯託Scotti

回答

2

該錯誤表明您沒有爲您的操作系統相關的X11頭包。這是而不是一個R包。您需要使用Ubuntu提供的任何工具來安裝它(因爲它是Debian off-shoot,apt get應該可以工作,但是可能有其他首選的技術用於將軟件包添加到您的操作系統。)

R安裝和管理手冊建議,對於Debian的,所需要的相關OS包是xorg-dev。試着安裝,使用Ubuntu的軟件包管理器,並重新安裝內部R.

@Dirk Eddelbuettel無疑評價是,預先內置RGL在Ubuntu的許多R的軟件包或至少一個R開發的元包,這將確保你有你的操作系統的所有頭包,所以你可以建立R包ges在安裝時。我不使用Ubuntu或Debian的,所以我不能跟你問的這方面

+1

哦,是的,他會的。:) –

+0

@Dirk Eddelbuettel請您提供一個鏈接來討論Ubuntu的元數據包? – isomorphismes

+0

@Lao Tzu這是你想要的嗎? http://cran.r-project.org/bin/linux/ubuntu/德克在他的答案中給出了一個鏈接錯字。我已經更新了它。 –

5

夫婦rerequisites的幫助:

  • the CRAN Ubuntu repository使用的R二進制文件。
  • sudo apt-get install r-base-dev做爲本地軟件包安裝的補充,如果你還沒有這樣做的話。
  • 然後做sudo apt-get install r-cran-rgl,因爲這是最難一個OpenGL標頭。

現在再次嘗試使用RForestGUI包及其其他依賴項,並按包分析錯誤。

0

已在OS X中的clusterSim包類似的問題

發現瞭解決方案rstudio board

X11是不是默認安裝的OS X的新版本,所以我只好裝Quartz(X11的osx分佈)