首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在Ubuntu12.04.4上为R2.15.3安装软件包reshape2

无法在Ubuntu12.04.4上为R2.15.3安装软件包reshape2
EN

Stack Overflow用户
提问于 2014-03-15 02:05:33
回答 1查看 5.1K关注 0票数 1

我在Ubuntu12.04.4LTS上安装R2.15.3的reshape2软件包有困难。我决定不升级到R3.x,因为我使用的许多软件包都没有升级以支持新版本。

当我尝试在Ubuntu12.04.4LTS上使用R2.15.3安装reshape2时,我得到以下信息。

代码语言:javascript
复制
> install.packages("reshape2")                                                                                      
Installing package(s) into â/usr/local/lib/R/site-libraryâ
(as âlibâ is unspecified)
Warning in install.packages("reshape2") :
  'lib = "/usr/local/lib/R/site-library"' is not writable
Would you like to use a personal library instead?  (y/n) y
Would you like to create a personal library
~/R/x86_64-pc-linux-gnu-library/2.15
to install packages into?  (y/n) y

Warning: dependency âRcppâ is not available
also installing the dependencies âplyrâ, âstringrâ

trying URL 'http://cran.cs.wwu.edu/src/contrib/plyr_1.8.1.tar.gz'
Content type 'application/x-gzip' length 393233 bytes (384 Kb)
opened URL
==================================================
downloaded 384 Kb

trying URL 'http://cran.cs.wwu.edu/src/contrib/stringr_0.6.2.tar.gz'
Content type 'application/x-gzip' length 20636 bytes (20 Kb)
opened URL
==================================================
downloaded 20 Kb

trying URL 'http://cran.cs.wwu.edu/src/contrib/reshape2_1.2.2.tar.gz'
Content type 'application/x-gzip' length 27220 bytes (26 Kb)
opened URL
==================================================
downloaded 26 Kb

ERROR: dependency âRcppâ is not available for package âplyrâ
* removing â/home/ubuntu/R/x86_64-pc-linux-gnu-library/2.15/plyrâ
* installing *source* package âstringrâ ...
** package âstringrâ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded

* DONE (stringr)
ERROR: dependency âplyrâ is not available for package âreshape2â
* removing â/home/ubuntu/R/x86_64-pc-linux-gnu-library/2.15/reshape2â

The downloaded source packages are in
        â/tmp/RtmpxP5OIc/downloaded_packagesâ
Warning messages:
1: In install.packages("reshape2") :
  installation of package âplyrâ had non-zero exit status
2: In install.packages("reshape2") :
  installation of package âreshape2â had non-zero exit status
> 

然后,我尝试安装缺少的Rcpp,但得到了错误消息:

代码语言:javascript
复制
Warning message:
package âRcppâ is not available (for R version 2.15.3) 

我搜索了更多,发现Rcpp现在需要RV3.x,但是有一个向后兼容的RcppClassic版本。

在尝试安装RcppClassic时,我得到:

代码语言:javascript
复制
Installing package(s) into â/home/ubuntu/R/x86_64-pc-linux-gnu-library/2.15â
(as âlibâ is unspecified)
Warning: dependency âRcppâ is not available
trying URL 'http://cran.cs.wwu.edu/src/contrib/RcppClassic_0.9.5.tar.gz'
Content type 'application/x-gzip' length 185057 bytes (180 Kb)
opened URL
==================================================
downloaded 180 Kb

ERROR: dependency âRcppâ is not available for package âRcppClassicâ
* removing â/home/ubuntu/R/x86_64-pc-linux-gnu-library/2.15/RcppClassicâ

The downloaded source packages are in
        â/tmp/RtmpxP5OIc/downloaded_packagesâ
Warning message:
In install.packages("RcppClassic") :
  installation of package âRcppClassicâ had non-zero exit status

然后,我尝试并能够使用"sudo apt install r-cran- Rcpp“安装rcpp:

代码语言:javascript
复制
$ sudo apt-get install r-cran-rcpp                                             
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgudev-1.0-0 gir1.2-gudev-1.0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  littler r-cran-int64
Suggested packages:
  r-cran-getopt r-cran-inline
The following NEW packages will be installed:
  littler r-cran-int64 r-cran-rcpp
0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded.
Need to get 2,899 kB of archives.
After this operation, 11.2 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ precise/universe littler amd64 0.1.5-1 [32.2 kB]
Get:2 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ precise/universe r-cran-int64 amd64 1.1.2-1 [359 kB]
Get:3 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ precise/universe r-cran-rcpp amd64 0.9.9-1 [2,508 kB]
Fetched 2,899 kB in 0s (8,959 kB/s)
Selecting previously unselected package littler.
(Reading database ... 60157 files and directories currently installed.)
Unpacking littler (from .../littler_0.1.5-1_amd64.deb) ...
Selecting previously unselected package r-cran-int64.
Unpacking r-cran-int64 (from .../r-cran-int64_1.1.2-1_amd64.deb) ...
Selecting previously unselected package r-cran-rcpp.
Unpacking r-cran-rcpp (from .../r-cran-rcpp_0.9.9-1_amd64.deb) ...
Processing triggers for man-db ...
Setting up littler (0.1.5-1) ...
Setting up r-cran-int64 (1.1.2-1) ...
Setting up r-cran-rcpp (0.9.9-1) ...

但是当我试图在R中安装"reshape2“时,我得到了与以前相同的错误消息。

我不明白的是,为什么我会收到错误信息:

代码语言:javascript
复制
Warning: dependency âRcppâ is not available

因为'sudo apt install r-cran-rcpp‘工作。

经过进一步的搜索,我在这里找到了一个关于如何使用RcppClassic:http://cran.r-project.org/web/packages/RcppClassic/vignettes/RcppClassic-intro.pdf的小插曲。

然而,对描述、命名空间和MAKEVAR文件的修改已经开始超出我的能力范围,因此我正在寻求帮助。

下面是sessionInfo()的输出:

代码语言:javascript
复制
> sessionInfo()
R version 2.15.3 (2013-03-01)
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=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=C                 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    

提前感谢!

编辑3/15/2014: --我的“用例”是,我在AWS EC2实例上运行一系列定期作业,所以我不需要最新/最优秀的软件特性。我在我的Mac开发机器上使用的是R2.15,所以我只是想将我所拥有的移植到我的AWS EC2 Ubuntu实例。

我使用的包是: reshape2、xlsx (和xlsxjars)、RJSONIO、stringr、R2HTML、RCurl、绘图、格、latticeExtra、gdata和ggplot2。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-03-15 03:38:18

有几件事:

  1. 您坚持使用Ubuntu12.04 LTS。稳定的分布。这很好。你自己选吧。这也意味着你选择在2012年4月前几个月冻结你的软件。
  2. 现在你想从克莱恩那得到点什么。当前的东西。这与前一点相抵触。
  3. 要么你呆在发行版里。或者你变成了现代的人。
  4. 阅读Ubuntu README并学习如何使用Ubuntu12.04,同时获得一个当前的R包。
  5. 安装R3.0.3(当前)通过该回购。
  6. 将您想要的CRAN包安装到/usr/local/lib/R/site-library中。
票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22418668

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档