0
votes

here's the log, nodejs is 0.10.36, rhel is 7 update 1, aerospike from repo

   gyp verb node dev dir /opt/app/engine/node_modules/aerospike/.node-gyp/0.10.36
   gyp verb `which` succeeded for `make` /usr/bin/make
   make: Entering directory `/opt/app/engine/node_modules/aerospike/build'
   gyp info spawn make
   gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
     LD_LIBRARY_PATH=/opt/app/engine/node_modules/aerospike/build/Release/lib.host:/opt/app/engine/node_modules/aerospike/build/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; mkdir -p aerospike-client-c/lib aerospike-client-c; scripts/aerospike-client-c.sh
   which: no lsb_release in (/usr/lib/node_modules/npm/bin/node-gyp-bin:/opt/app/engine/node_modules/aerospike/node_modules/.bin:/opt/app/engine/node_modules/.bin:/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin)
   error:  is not supported.
   make: *** [aerospike-client-c/lib/libaerospike.a] Error 1
   make: Leaving directory `/opt/app/engine/node_modules/aerospike/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:267:23)
   gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
   gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
   gyp ERR! System Linux 3.10.0-229.el7.x86_64
   gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
   gyp ERR! cwd /opt/app/engine/node_modules/aerospike
   gyp ERR! node -v v0.10.36
   gyp ERR! node-gyp -v v1.0.1
   gyp ERR! not ok 

   npm verb unsafe-perm in lifecycle false
   npm info [email protected] Failed to exec install script
   npm ERR! [email protected] install: `node-gyp rebuild`
   npm ERR! Exit status 1
   npm ERR! 
   npm ERR! Failed at the [email protected] install script.
   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 their info via:
   npm ERR!     npm owner ls aerospike
   npm ERR! There is likely additional logging output above.
   npm ERR! System Linux 3.10.0-229.el7.x86_64
   npm ERR! command "/usr/bin/node" "/bin/npm" "install" "--force-unsafe" "--verbose" "aerospike"
   npm ERR! cwd /opt/app/engine
   npm ERR! node -v v0.10.36
   npm ERR! npm -v 1.4.28
   npm ERR! code ELIFECYCLE
   npm verb exit [ 1, true ]
   npm verb node_modules/aerospike unbuild
   npm info preuninstall [email protected]
   npm info uninstall [email protected]
   npm verb true,/opt/app/engine/node_modules,/opt/app/engine/node_modules unbuild [email protected]
   npm info postuninstall [email protected]
   npm ERR! not ok code 0
1

1 Answers

2
votes

unsafe-perm is set to false in the machine you are trying to install Aerospike Nodejs Client. This must to be set to true if you are running as a non-root user. Aerospike nodejs installation has a script that downloads Aerospike packages into a separate directory. This requires unsafe-perm to be true. For details refer here.

To set unsafe-perm to true, $npm set unsafe-perm true.

Let me know if the problem persists.