I have a fresh installation of Ubuntu 14.04 and installed compiled version of node.js 10.38.
npm install failed on node-gyp rebuild step with error 'make: g++: Command not found'.
apt-get install g++ solves the problem. It make sense put g++ dependency into README.md Prerequisites section.