# \[Resolvido\]\[construindo-apis-rest-com-nodejs\] - Erro ao install bcrypt

**URL:** <https://forum.casadocodigo.com.br/t/resolvido-construindo-apis-rest-com-nodejs-erro-ao-install-bcrypt/96>\
**Category:** Livros\
**Tags:** apis-rest-nodejs\
**Created:** [Fevereiro 15, 2016, 8:45pm UTC](https://forum.casadocodigo.com.br/t/resolvido-construindo-apis-rest-com-nodejs-erro-ao-install-bcrypt/96 "2016-02-15T20:45:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![erorci](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@erorci](https://forum.casadocodigo.com.br/u/erorci)\
**Post date:** [Fevereiro 15, 2016, 8:45pm UTC](https://forum.casadocodigo.com.br/t/resolvido-construindo-apis-rest-com-nodejs-erro-ao-install-bcrypt/96/1 "2016-02-15T20:45:41Z")

</div>

Olá pessoal,

Estou no capítulo 7 do livro.  
Utilizo Ubuntu, minha versão do node é v5.5.0 e do npm 3.3.12.

Os executar a instalação do bcrypt tenho o erro abaixo.

emersonr@emersonr-VirtualBox:~/workspace/nodejs/ntask-api$ npm install bcrypt --save  
npm WARN install Couldn’t install optional dependency: Unsupported

> bcrypt@0.8.5 install /home/emersonr/workspace/nodejs/ntask-api/node\_modules/bcrypt  
> node-gyp rebuild

make: Entering directory ‘/home/emersonr/workspace/nodejs/ntask-api/node\_modules/bcrypt/build’  
CXX(target) Release/obj.target/bcrypt\_lib/src/blowfish.o  
make: g++: Command not found  
bcrypt\_lib.target.mk:92: recipe for target ‘Release/obj.target/bcrypt\_lib/src/blowfish.o’ failed  
make: \*\*\* [Release/obj.target/bcrypt\_lib/src/blowfish.o] Error 127  
make: Leaving directory ‘/home/emersonr/workspace/nodejs/ntask-api/node\_modules/bcrypt/build’  
gyp ERR! build error  
gyp ERR! stack Error: `make` failed with exit code: 2  
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node\_modules/npm/node\_modules/node-gyp/lib/build.js:270:23)  
gyp ERR! stack at emitTwo (events.js:100:13)  
gyp ERR! stack at ChildProcess.emit (events.js:185:7)  
gyp ERR! stack at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:200:12)  
gyp ERR! System Linux 3.19.0-49-generic  
gyp ERR! command “/usr/bin/nodejs” “/usr/lib/node\_modules/npm/node\_modules/node-gyp/bin/node-gyp.js” “rebuild”  
gyp ERR! cwd /home/emersonr/workspace/nodejs/ntask-api/node\_modules/bcrypt  
gyp ERR! node -v v5.5.0  
gyp ERR! node-gyp -v v3.0.3  
gyp ERR! not ok  
npm WARN EPACKAGEJSON ntask-api@1.0.0 No repository field.  
npm WARN EPACKAGEJSON ntask-api@1.0.0 No license field.  
npm ERR! Linux 3.19.0-49-generic  
npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “install” “bcrypt” “–save”  
npm ERR! node v5.5.0  
npm ERR! npm v3.3.12  
npm ERR! code ELIFECYCLE

npm ERR! bcrypt@0.8.5 install: `node-gyp rebuild`  
npm ERR! Exit status 1  
npm ERR!  
npm ERR! Failed at the bcrypt@0.8.5 install script ‘node-gyp rebuild’.  
npm ERR! Make sure you have the latest version of node.js and npm installed.  
npm ERR! If you do, 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/emersonr/workspace/nodejs/ntask-api/npm-debug.log

Se alguém puder me ajudar agradeço desde já.

Emerson

---

<div class="post-metadata">

**Author:** ![erorci](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@erorci](https://forum.casadocodigo.com.br/u/erorci)\
**Post date:** [Fevereiro 15, 2016, 9:08pm UTC](https://forum.casadocodigo.com.br/t/resolvido-construindo-apis-rest-com-nodejs-erro-ao-install-bcrypt/96/2 "2016-02-15T21:08:17Z")

</div>

Resolvi através um post no stackoverflow.

“[http://stackoverflow.com/questions/25848475/unable-to-install-npm-bcrypt-on-ubuntu](http://stackoverflow.com/questions/25848475/unable-to-install-npm-bcrypt-on-ubuntu)”

Obrigado.
