无法安装.packages():系统调用失败:无法分配内存;安装包的退出状态非零 [英] Unable to install.packages(): system call failed: Cannot allocate memory; installation of package had non-zero exit status

查看:45
本文介绍了无法安装.packages():系统调用失败:无法分配内存;安装包的退出状态非零的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在平台上使用 R 版本 3.1.2 (2014-10-31) --南瓜头盔":x86_64-pc-linux-gnu(64 位).

I'm using R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet" on Platform: x86_64-pc-linux-gnu (64-bit).

我在使用 RStudio 在 R 中安装新软件包时遇到问题.当我调用 install.packages() 函数时,我得到:

I have an issue installing new packages in R, using RStudio. When I call the install.packages() function, I get:

Warning in install.packages :
system call failed: Cannot allocate memory
Warning in install.packages :
installation of package ‘pastecs’ had non-zero exit status

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

我已经通过 shell 命令安装了 R,它运行正常.我还将 swappiness 值降低到 10,但我不确定它是否与问题有关.

I have installed R via shell commands and it worked ok. I've also decreased the swappiness value to 10, but I'm not sure if it has anything to do with the problem.

提前致谢!

推荐答案

我想通了.我只关心交换价值.
有几个网页建议减少默认交换使用以加速 Ubuntu.我做了什么来解决问题.

I figured out. I was all about the swap value.
There are several web pages that advice to decrease the default swap use in order to speed up Ubuntu. What I did to fix the problem.

在终端...

#Know the swap value    
cat /proc/sys/vm/swappiness
10
# Access the swap configuration
gksudo leafpad /etc/sysctl.conf

# Increase the swap usage to 30 (default is 60)
vm.swappiness=30

然后,我重新启动.并愉快地安装了软件包,没有任何问题.

Then, I rebooted. And installed the packages happily without any problems.

这篇关于无法安装.packages():系统调用失败:无法分配内存;安装包的退出状态非零的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆