2011-06-24 65 views
3

我按照http://cran.r-project.org/bin/linux/ubuntu/的指示通过CRAN回购安装了R。我以前可以在其他几个完全相同的Ubuntu 10.04系统上安装脱字号,但今天install.packages('caret', dependencies=c('Depends','Suggests'))导致以下错误(仅为示例)。任何提示?在Ubuntu 10.04上安装R 2.13.0软件包(插入符号)时出错

 
... 
** testing if installed package can be loaded 

* DONE (dynlm) 
ERROR: dependencies ‘reshape’, ‘plyr’, ‘digest’ are not available for package ‘ggplot2’ 
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/ggplot2’ 
ERROR: dependencies ‘digest’, ‘stringr’, ‘mutatr’, ‘evaluate’ are not available for package ‘testthat’ 
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/testthat’ 
* installing *source* package ‘ROCR’ ... 
** R 
... 
** testing if installed package can be loaded 

* DONE (ROCR) 
ERROR: dependencies ‘plyr’, ‘stringr’ are not available for package ‘reshape2’ 
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/reshape2’ 
* installing *source* package ‘party’ ... 
** libs 
... 
** testing if installed package can be loaded 

* DONE (party) 
ERROR: dependencies ‘reshape’, ‘plyr’ are not available for package ‘caret’ 
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/caret’ 
* installing *source* package ‘rocc’ ... 
** R 
... 
* DONE (rocc) 
ERROR: dependency ‘reshape2’ is not available for package ‘Cubist’ 
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/Cubist’ 

The downloaded packages are in 
     ‘/tmp/Rtmp2TsElZ/downloaded_packages’ 
There were 20 warnings (use warnings() to see them) 
> warnings() 
Warning messages: 
1: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'Rmpi' had non-zero exit status 
2: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'rpvm' had non-zero exit status 
3: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'rsprng' had non-zero exit status 
4: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'XML' had non-zero exit status 
5: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'RODBC' had non-zero exit status 
6: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'rgl' had non-zero exit status 
7: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'RWeka' had non-zero exit status 
8: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'shapes' had non-zero exit status 
9: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'rgeos' had non-zero exit status 
10: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'rgdal' had non-zero exit status 
11: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'plyr' had non-zero exit status 
12: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'stringr' had non-zero exit status 
13: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'latentnet' had non-zero exit status 
14: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'reshape' had non-zero exit status 
15: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'statnet' had non-zero exit status 
16: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'ggplot2' had non-zero exit status 
17: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'testthat' had non-zero exit status 
18: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'reshape2' had non-zero exit status 
19: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'caret' had non-zero exit status 
20: In install.packages("caret", dependencies = c("Depends", ... : 
    installation of package 'Cubist' had non-zero exit status 
> library(caret) 
Error in library(caret) : there is no package called 'caret' 

> sessionInfo() 
R version 2.13.0 (2011-04-13) 
Platform: x86_64-pc-linux-gnu (64-bit) 

locale: 
[1] LC_CTYPE=en_US.UTF-8  LC_NUMERIC=C 
[3] LC_TIME=en_US.UTF-8  LC_COLLATE=en_US.UTF-8 
[5] LC_MONETARY=C    LC_MESSAGES=en_US.UTF-8 
[7] LC_PAPER=en_US.UTF-8  LC_NAME=C 
[9] LC_ADDRESS=C    LC_TELEPHONE=C 
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C 

attached base packages: 
[1] stats  graphics grDevices utils  datasets methods base 

loaded via a namespace (and not attached): 
[1] tools_2.13.0 
> install.packages('caret', dependencies=c('Depends','Suggests')) # run again 
... 
ERROR: dependencies ‘digest’, ‘stringr’, ‘mutatr’, ‘evaluate’ are not available for package ‘testthat’ 
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/testthat’ 
ERROR: dependency ‘itertools’ is not available for package ‘plyr’ 
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/plyr’ 
ERROR: dependencies ‘RWekajars’, ‘rJava’ are not available for package ‘RWeka’ 
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/RWeka’ 
ERROR: dependencies ‘plyr’, ‘stringr’ are not available for package ‘reshape2’ 
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/reshape2’ 
ERROR: dependency ‘plyr’ is not available for package ‘reshape’ 
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/reshape’ 
ERROR: dependency ‘reshape2’ is not available for package ‘Cubist’ 
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/Cubist’ 
ERROR: dependencies ‘reshape’, ‘plyr’ are not available for package ‘caret’ 
* removing ‘/home/yang/R/x86_64-pc-linux-gnu-library/2.13/caret’ 
... 
+0

这不是一个真正的编程问题。它更适合超级用户。 –

回答

3

你的Ubuntu盒子上是否有正确的开发包套件?我将开始处理失败的软件包列表,并尝试使用install.packages()逐个安装它们。我知道一些失败的软件包需要大量的编译R包的开发头文件。

如果你一次只做一个,你就会明白为什么包会失败。我使用Fedora,但是对于rgdal,例如,从我的发行版软件包管理器安装gdal-develproj-devel,和proj-nad以便编译该R软件包。对于XML我需要安装libxml2-devel等。如果您逐步了解发生故障的R包,应该明白哪些头文件丢失了,您可以使用包管理器查找需要安装哪个Ubuntu包(debs)获取这些标题。

+0

不必安装任何开发包,但是你的“一次一个”提示工作 - 奇怪/令人沮丧,回去安装依赖关系,R正在抱怨一个个神奇地让R快乐。啊。 – Yang

+1

刚刚在R 2.14.0中遇到同样的问题。在Google上搜索并找到了我自己的问题(和答案评论)。很高兴我发布了这个。 – Yang