title: How can I install npm and Node.js on Ubuntu?
body: <p>I have installed Node.js by:</p>
  <pre class="lang-none prettyprint-override"><code>curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
  sudo apt-get install -y nodejs
  </code></pre>
  <p>Installation is done well and when I try to install npm,</p>
  <pre class="lang-none prettyprint-override"><code>sudo apt-get install npm
  </code></pre>
  <p>I receive this output:</p>
  <pre class="lang-none prettyprint-override"><code>Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  Some packages could not be installed. This may mean that you have
  requested an impossible situation or if you are using the unstable
  distribution that some required packages have not yet been created
  or been moved out of Incoming.
  The following information may help to resolve the situation:
  
  The following packages have unmet dependencies:
   npm : Depends: node-gyp (&gt;= 0.10.9) but it is not going to be installed
  E: Unable to correct problems, you have held broken packages.
  </code></pre>
  <p>What can I do with this?</p>
  <p>When I run <code>npm --version</code>, the output is following:</p>
  <pre class="lang-none prettyprint-override"><code>The program 'npm' is currently not installed. You can install it by typing:
  
  sudo apt install npm
  </code></pre>