<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ubuntu on Daniel Pomfret</title>
    <link>https://pomfret.uk/tags/ubuntu/</link>
    <description>Recent content in Ubuntu on Daniel Pomfret</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>© Daniel Pomfret</copyright>
    <lastBuildDate>Wed, 21 Feb 2018 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://pomfret.uk/tags/ubuntu/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>npm install : Killed (Ubuntu 16.04)</title>
      <link>https://pomfret.uk/posts/npm-install-killed-ubuntu-16-04/</link>
      <pubDate>Wed, 21 Feb 2018 00:00:00 +0000</pubDate>
      <guid>https://pomfret.uk/posts/npm-install-killed-ubuntu-16-04/</guid>
      <description>&lt;p&gt;While installing packages via npm, it failed with just the message &amp;ldquo;Killed&amp;rdquo;. Automatically this triggers me to believe it is memory related. I was after all running the VM with only 1G memory.&lt;/p&gt;&#xA;&lt;h2 id=&#34;fix-npm-install-killed&#34;&gt;Fix npm install Killed&lt;/h2&gt;&#xA;&lt;p&gt;So to resolve this, you need to create and extend a swap file.&lt;/p&gt;&#xA;&lt;p&gt;You can do this in Ubuntu 14.04 and 16.04 with the following commands:&lt;/p&gt;&#xA;&lt;p&gt;sudo fallocate -l 1G /swapfile&#xA;sudo chmod 600 /swapfile&#xA;sudo mkswap /swapfile&#xA;sudo swapon /swapfile&#xA;sudo swapon &amp;ndash;show&#xA;sudo cp /etc/fstab /etc/fstab.bak&#xA;echo &amp;lsquo;/swapfile none swap sw 0 0&amp;rsquo; | sudo tee -a /etc/fstab&#xA;sudo sysctl vm.swappiness=10&#xA;echo &amp;lsquo;vm.swappiness=10&amp;rsquo; | sudo tee -a /etc/sysctl.conf&#xA;sudo sysctl vm.vfs_cache_pressure=50&#xA;echo &amp;lsquo;vm.vfs_cache_pressure=50&amp;rsquo; | sudo tee -a /etc/sysctl.conf&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
