title: Installing Apache Cordova - cordova: command not found
body: <p>I am desperately trying to install and invoke apache cordova on my computer, following the instructions here (doing it by command line):
  <a href="http://cordova.apache.org/docs/en/3.5.0//guide_cli_index.md.html#The%20Command-Line%20Interface" rel="nofollow noreferrer">http://cordova.apache.org/docs/en/3.5.0//guide_cli_index.md.html#The%20Command-Line%20Interface</a></p>
  
  <p>I do install nodejs (v0.10.15) and npm (1.2.18) successfully.
  However, when I enter:</p>
  
  <pre><code>   sudo npm install -g cordova
  </code></pre>
  
  <p>It installs partially successfull, throwing some Exceptions in the end.</p>
  
  <pre><code>&gt;npm ERR! Error: invalid version: 3001.0001.0000-dev-harmony-fb
  &gt;npm ERR!     at validVersion (/usr/lib/nodejs/read-package-json/read-json.js:573:40)
  &gt;npm ERR!     at final (/usr/lib/nodejs/read-package-json/read-json.js:323:23)
  &gt;npm ERR!     at /usr/lib/nodejs/read-package-json/read-json.js:139:33
  &gt;npm ERR!     at cb (/usr/lib/nodejs/slide/lib/async-map.js:48:11)
  &gt;npm ERR!     at /usr/lib/nodejs/read-package-json/read-json.js:251:40
  &gt;npm ERR!     at fs.js:268:14
  &gt;npm ERR!     at /usr/lib/nodejs/graceful-fs/graceful-fs.js:103:5
  &gt;npm ERR!     at Object.oncomplete (fs.js:107:15)
  &gt;npm ERR! If you need help, you may report this log at:
  &gt;npm ERR!     &lt;http://bugs.debian.org/npm&gt;
  &gt;npm ERR! or use
  &gt;npm ERR!     reportbug --attach /npm-debug.log npm
  &gt;npm ERR! System Linux 3.11.0-26-generic
  &gt;npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "cordova"
  &gt;npm ERR! cwd /
  &gt;npm ERR! node -v v0.10.15
  &gt;npm ERR! npm -v 1.2.18
  &gt;npm ERR! 
  &gt;npm ERR! Additional logging details can be found in:
  &gt;npm ERR!     /npm-debug.log
  &gt;npm ERR! not ok code 0
  </code></pre>
  
  <p>it looks like npm has been installed to /usr/share/npm<img src="https://i.stack.imgur.com/PRIow.png" alt="enter image description here"></p>
  
  <p>which I added to my PATH (/etc/environment), proven by</p>
  
  <pre><code>  echo $PATH
  </code></pre>
  
  <p>Still, I cannot invoke </p>
  
  <pre><code>cordova
  </code></pre>
  
  <p>as, it keeps saying:</p>
  
  <blockquote>
    <p>cordova: command not found</p>
  </blockquote>
  
  <p>Who can help me?</p>