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

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

Resolvi através um post no stackoverflow.

http://stackoverflow.com/questions/25848475/unable-to-install-npm-bcrypt-on-ubuntu

Obrigado.