Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
701 views
in Technique[技术] by (71.8m points)

r - Unable to install.packages(): system call failed: Cannot allocate memory; installation of package had non-zero exit status

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

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’

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.

Thanks in advance!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

In the terminal...

#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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...