Sunday, 11 June 2017

Error on installing bcrypt in Ubuntu 16.04

I tried to install node project i got error at building of application on bcrypt. then i tried many things to short out problem but still problem ig going on. then i tried install bcrypt globally but got error as below.

    sudo npm install -g bcrypt

> bcrypt@1.0.2 install /usr/lib/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(undefined): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v48-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for bcrypt@1.0.2 and node@6.11.0 (node-v48 ABI) (falling back to source compile with node-gyp) 
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/nodejs',
gyp verb cli   '/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'clean' ]
gyp info using node-gyp@3.4.0
gyp info using node@6.11.0 | linux | x64
gyp verb command clean []
gyp verb clean removing "build" directory
gyp info ok 
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/nodejs',
gyp verb cli   '/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'configure',
gyp verb cli   '--fallback-to-build',
gyp verb cli   '--module=/usr/lib/node_modules/bcrypt/lib/binding/bcrypt_lib.node',
gyp verb cli   '--module_name=bcrypt_lib',
gyp verb cli   '--module_path=/usr/lib/node_modules/bcrypt/lib/binding' ]
gyp info using node-gyp@3.4.0
gyp info using node@6.11.0 | linux | x64
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import platform; print(platform.python_version());"` returned: "2.7.12\n"
gyp verb get node dir no --target version specified, falling back to host node version: 6.11.0
gyp verb command install [ '6.11.0' ]
gyp verb install input version string "6.11.0"
gyp verb install installing version: 6.11.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 6.11.0
gyp verb build dir attempting to create "build" dir: /usr/lib/node_modules/bcrypt/build
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/bcrypt/build'
gyp ERR! stack     at Error (native)
gyp ERR! System Linux 4.4.0-79-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/lib/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/usr/lib/node_modules/bcrypt/lib/binding"
gyp ERR! cwd /usr/lib/node_modules/bcrypt
gyp ERR! node -v v6.11.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/usr/lib/node_modules/bcrypt/lib/binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/bcrypt/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:891:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 4.4.0-79-generic
node-pre-gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/lib/node_modules/bcrypt
node-pre-gyp ERR! node -v v6.11.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok 
Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/usr/lib/node_modules/bcrypt/lib/binding' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@1.0.2 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bcrypt@1.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/manoj/.npm/_logs/2017-06-11T11_18_47_018Z-debug.log

What can i do to solve this problem in my pc.



via manoj

No comments:

Post a Comment