简体   繁体   English

install.packages() 由于内存不足而失败?

[英]install.packages() failing due to lack of memory?

I have a VPS with Ramnode with Ubuntu 12.04 64-bit.我有一个带有 Ramnode 和 Ubuntu 12.04 64 位的 VPS。 I have their low memory plan (128mb).我有他们的低内存计划(128mb)。 I have successfully installed R, but I cannot install any packages from CRAN.我已成功安装 R,但无法从 CRAN 安装任何软件包。 This is the result:这是结果:

> install.packages("Rccp",repos="http://cran.us.r-project.org")
Installing package into '/usr/local/lib/R/site-library'
(as 'lib' is unspecified)
Killed

And then R is exited automatically.然后 R 自动退出。 The same happens regardless of which package I try to install.无论我尝试安装哪个软件包,都会发生同样的情况。 My memory usage is maxed while the installation is in progress, so I imagine that is where the problem is.我的内存使用量在安装过程中达到了最大值,所以我想这就是问题所在。

In anticipation of this answer, I want to say that I know a simple solution is to purchase a VPS with more memory, but I am looking for a workaround for the package install.期待这个答案,我想说我知道一个简单的解决方案是购买具有更多内存的 VPS,但我正在寻找安装包的解决方法。 For my purposes, R works fine with 128mb memory except for the package installation.就我而言,R 可以在 128mb 内存下正常工作,但包安装除外。 I don't want to pay 2x (or more) what I am paying now just so that I can install the packages I need, because after this installation I won't need that extra memory again.我不想支付 2 倍(或更多)我现在支付的费用,以便我可以安装我需要的软件包,因为在安装之后我将不再需要额外的内存。

Unfortunately, the only fix was to indeed pony up and upgrade the memory available to my VPS.不幸的是,唯一的解决办法是确实增加和升级我的 VPS 可用的内存。 There was no workaround.没有解决方法。 I did this and was able to install the packages successfully.我这样做了并且能够成功安装软件包。

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

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