简体   繁体   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

I've seen this: How should I deal with "package 'xxx' is not available (for R version xyz)" warning? 我已经看到了: 如何处理“软件包'xxx'不可用(对于R版本xyz)”警告?

and been through the list. 并通过列表。 No luck. 没运气。 I've also navigated via SSH to my library to see if there was some LOCK file or corrupt install. 我还通过SSH导航到我的库,以查看是否有一些LOCK文件或安装损坏。 There is nothing there. 那里什么都没有。

I literally just installed RStudio on Amazon EC2 and can't install the any new packages. 我实际上只是在Amazon EC2上安装了RStudio,无法安装任何新软件包。 I've done it this way: https://aws.amazon.com/blogs/big-data/running-r-on-aws/ I've also used Ubuntu with Louis Anslett's AMI: http://www.louisaslett.com/RStudio_AMI/ 我这样做是这样的: https ://aws.amazon.com/blogs/big-data/running-r-on-aws/我也将Ubuntu与Louis Anslett的AMI一起使用: http://www.louisaslett .COM / RStudio_AMI /

I get the same problem in both. 我在两个方面都遇到相同的问题。 I have downloaded them manually and installed the tar.gz files from the temp directory. 我已经手动下载了它们,并从temp目录中安装了tar.gz文件。 The CRAN repository seems to be fine because install.packages() downloads the tar.gz to /tmp/Rtmp2Rh9Zr/downloaded_packages/ just fine, but then the actual install process fails. CRAN存储库似乎很好,因为install.packages()可以将tar.gz下载到/ tmp / Rtmp2Rh9Zr / downloaded_pa​​ckages /,但实际上安装过程失败。

When I run install.packages("haven") for instance, it says 例如,当我运行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’

When I install it using the already downloaded package, it says 当我使用已经下载的软件包安装它时,它说

> 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)

On my EC2 instance, I ran into the same problems when trying to install packages on RStudio, eg, car, that involve RAM-intensive compilations. 在我的EC2实例上,尝试在RStudio上安装涉及RAM密集型编译的软件包(例如car)时遇到了相同的问题。 This could be fixed by adding swap space as described here 如此处所述,可以通过添加交换空间来解决此问题

http://www.exegetic.biz/blog/2015/06/amazon-ec2-adding-swap/ 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