繁体   English   中英

Amazon EC2上RStudio上的install.package()不起作用。 软件包不适用于R版本3.3.3

[英]install.package() on RStudio on Amazon EC2 doesn't work. Package not available for R version 3.3.3

我已经看到了: 如何处理“软件包'xxx'不可用(对于R版本xyz)”警告?

并通过列表。 没运气。 我还通过SSH导航到我的库,以查看是否有一些LOCK文件或安装损坏。 那里什么都没有。

我实际上只是在Amazon EC2上安装了RStudio,无法安装任何新软件包。 我这样做是这样的: https ://aws.amazon.com/blogs/big-data/running-r-on-aws/我也将Ubuntu与Louis Anslett的AMI一起使用: http://www.louisaslett .COM / RStudio_AMI /

我在两个方面都遇到相同的问题。 我已经手动下载了它们,并从temp目录中安装了tar.gz文件。 CRAN存储库似乎很好,因为install.packages()可以将tar.gz下载到/ tmp / Rtmp2Rh9Zr / downloaded_pa​​ckages /,但实际上安装过程失败。

例如,当我运行install.packages(“ haven”)时,它说

> install.packages("haven")
Installing package into ‘/home/jblocher/R/x86_64-redhat-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependencies ‘R6’, ‘assertthat’, ‘rlang’, ‘Rcpp’, ‘readr’, ‘hms’, ‘tibble’, ‘BH’

trying URL 'https://cran.rstudio.com/src/contrib/R6_2.2.1.tar.gz'
Content type 'application/x-gzip' length 325641 bytes (318 KB)
==================================================
downloaded 318 KB

trying URL 'https://cran.rstudio.com/src/contrib/assertthat_0.2.0.tar.gz'
Content type 'application/x-gzip' length 11612 bytes (11 KB)
==================================================
downloaded 11 KB

trying URL 'https://cran.rstudio.com/src/contrib/rlang_0.1.1.tar.gz'
Content type 'application/x-gzip' length 201419 bytes (196 KB)
==================================================
downloaded 196 KB

trying URL 'https://cran.rstudio.com/src/contrib/Rcpp_0.12.11.tar.gz'
Content type 'application/x-gzip' length 2485092 bytes (2.4 MB)
==================================================
downloaded 2.4 MB

trying URL 'https://cran.rstudio.com/src/contrib/readr_1.1.1.tar.gz'
Content type 'application/x-gzip' length 233793 bytes (228 KB)
==================================================
downloaded 228 KB

trying URL 'https://cran.rstudio.com/src/contrib/hms_0.3.tar.gz'
Content type 'application/x-gzip' length 7271 bytes
==================================================
downloaded 7271 bytes

trying URL 'https://cran.rstudio.com/src/contrib/tibble_1.3.1.tar.gz'
Content type 'application/x-gzip' length 91235 bytes (89 KB)
==================================================
downloaded 89 KB

trying URL 'https://cran.rstudio.com/src/contrib/BH_1.62.0-1.tar.gz'
Content type 'application/x-gzip' length 10181096 bytes (9.7 MB)
==================================================
downloaded 9.7 MB

trying URL 'https://cran.rstudio.com/src/contrib/haven_1.0.0.tar.gz'
Content type 'application/x-gzip' length 150016 bytes (146 KB)
==================================================
downloaded 146 KB

Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
  installation of package ‘R6’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
  installation of package ‘assertthat’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
  installation of package ‘rlang’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
  installation of package ‘Rcpp’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
  installation of package ‘hms’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
  installation of package ‘BH’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
  installation of package ‘tibble’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
  installation of package ‘readr’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
  installation of package ‘haven’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmpia0VEs/downloaded_packages’

当我使用已经下载的软件包安装它时,它说

> install.packages("/tmp/Rtmp2Rh9Zr/downloaded_packages/haven_1.0.0.tar.gz")
Installing package into ‘/home/jblocher/R/x86_64-redhat-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘/tmp/Rtmp2Rh9Zr/downloaded_packages/haven_1.0.0.tar.gz’ is not available (for R version 3.3.3)

如果要提供要安装的存档文件install.packages ,则可能需要指定repos=NULL

install.packages("/tmp/Rtmp2Rh9Zr/downloaded_packages/haven_1.0.0.tar.gz", repos=NULL)

在我的EC2实例上,尝试在RStudio上安装涉及RAM密集型编译的软件包(例如car)时遇到了相同的问题。 如此处所述,可以通过添加交换空间来解决此问题

http://www.exegetic.biz/blog/2015/06/amazon-ec2-adding-swap/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM