title: Bcrypt installation failed on Linux
body: <p>First, I tried installing bcrypt with npm.</p>
  
  <p>Error :</p>
  
  <pre><code>/
  &gt; bcrypt@0.8.5 install /home/saaggy18/node-projects/10-projects/node_modules/bcrypt
  &gt; node-gyp rebuild
  
  /usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp: 3: /usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp: node: Permission denied
  npm ERR! Linux 3.19.0-33-generic
  npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "bcrypt"
  npm ERR! node v4.2.2
  npm ERR! npm  v2.14.7
  npm ERR! code ELIFECYCLE
  
  npm ERR! bcrypt@0.8.5 install: `node-gyp rebuild`
  npm ERR! Exit status 126
  npm ERR! 
  npm ERR! Failed at the bcrypt@0.8.5 install script 'node-gyp rebuild'.
  npm ERR! This is most likely a problem with the bcrypt package,
  npm ERR! not with npm itself.
  npm ERR! Tell the author that this fails on your system:
  npm ERR!     node-gyp rebuild
  npm ERR! You can get their info via:
  npm ERR!     npm owner ls bcrypt
  npm ERR! There is likely additional logging output above.
  
  npm ERR! Please include the following file with any support request:
  npm ERR!     /home/saaggy18/node-projects/10-projects/npm-debug.log
  </code></pre>
  
  <p>Then I found <a href="https://stackoverflow.com/questions/10153317/cannot-install-bcrypt-node-js-module-on-centos-server/20895568#20895568">this</a> question</p>
  
  <p>On the 3rd step that is, <code>node-gyp configure</code></p>
  
  <p>It's hitting an error :</p>
  
  <pre><code>Error: Cannot find module 'nan'
      at Function.Module._resolveFilename (module.js:337:15)
      at Function.Module._load (module.js:287:25)
      at Module.require (module.js:366:17)
      at require (module.js:385:17)
      at [eval]:1:1
      at Object.exports.runInThisContext (vm.js:54:17)
      at Object.&lt;anonymous&gt; ([eval]-wrapper:6:22)
      at Module._compile (module.js:435:26)
      at node.js:578:27
      at doNTCallback0 (node.js:419:9)
  gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
  gyp ERR! configure error 
  gyp ERR! stack Error: `gyp` failed with exit code: 1
  gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:305:16)
  gyp ERR! stack     at emitTwo (events.js:87:13)
  gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
  gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
  gyp ERR! System Linux 3.19.0-33-generic
  gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/node-gyp" "configure"
  gyp ERR! cwd /home/saaggy18/node.bcrypt.js
  gyp ERR! node -v v4.2.2
  gyp ERR! node-gyp -v v3.2.0
  gyp ERR! not ok 
  </code></pre>
  
  <p>My OS : Elementary Os Freya, which is basically Ubuntu and
  I have python installed.</p>