0
votes

I am trying to install aerospike nodejs module but not able to install it. Getting below error.

aerospike failed at step 'node-gyp rebuild' exit status 1

aerospike failed at step 'node-gyp rebuild' exit status 1 /usr/bin/ld: cannot find -lssl collect2: error: ld returned 1 exit status aerospike.target.mk:193: recipe for target 'Release/obj.target/aerospike.node' failed make: *** [Release/obj.target/aerospike.node] Error 1 rm binding_gyp_aerospike_client_c_target_Installing_Aerospike_C_Client_dependency.intermediate make: Leaving directory '/home/kartiknigam/repository/forms/node_modules/aerospike/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/kartiknigam/.nvm/v4.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) 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 4.15.0-39-generic gyp ERR! command "/home/kartik/.nvm/v4.5.0/bin/node" "/home/kartik/.nvm/v4.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/kartik/repository/forms/node_modules/aerospike gyp ERR! node -v v4.5.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm ERR! Linux 4.15.0-39-generic npm ERR! argv "/home/kartik/.nvm/v4.5.0/bin/node" "/home/kartik/.nvm/v4.5.0/bin/npm" "i" "aerospike" npm ERR! node v4.5.0 npm ERR! npm v2.15.9 npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the aerospike 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 information on how to open an issue for this project with: npm ERR! npm bugs aerospike npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm ERR! npm owner ls aerospike npm ERR! There is likely additional logging output above.

1

1 Answers

4
votes

First try to install 'node-gyp rebuild':

npm install node-gyp rebuild

If the error is still persistent then check for the following dependencies, as Aerospike depends on them:

  • libssl-dev
  • zlib1g-dev
  • libpng-dev

If not installed already, install these packages by:

sudo apt-get install libssl-dev
sudo apt-get install zlib1g-dev
sudo apt-get install libpng-dev