title: "Cannot allocate memory" and "non-zero exit status" - Can't install R packages on Raspberry Pi
body: <p>I'm having this problem while trying to install any package in my Raspberry Pi.</p>
  
  <p>Some general info about the system and software:</p>
  
  <p>Raspberry Pi 3<br>
  Raspbian Jessie with Pixel (Novermber 2016, latest version)<br>
  R 3.1.1 </p>
  
  <p>When I try <strong>install.packages("XML")</strong>, it asks me to choose a mirror, then after I choose and it download, the result is:</p>
  
  <pre><code>The dowloaded source packages are in  
  '/tmp/RtmpBOxeKj/downloaded_packages'
  </code></pre>
  
  <p><code>Warning messages:</code><br>
   <code>1: In system2(cmd0, args, env = env, stdout = outfile, stderr = outfile) :   system call failed: Cannot allocate memory</code><br>
   <code>2:  In install.packages("XML") :   installation of package 'XML' had non-zero exit status</code></p>
  
  <p>This happens with any package I try to install (sometimes only the second error and sometimes both).</p>
  
  <p>After booting Raspbian I have 610MB of free RAM and after opening the R console I have 582MB of free RAM, then goes down to 282MB when I try installing the package. Shouldn't that be enough?</p>
  
  <p>Any idea?</p>