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

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


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/swappiness10# Access the swap configurationgksudo 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.


I confirm that the problem was with RAM space. i closed some background applications and it installed smoothly without any need to reboot my system


just restart the r-session. that did the trick for me.