Orion98MC / node_rrd

A node.js native binding for RRDtool (node rrd)
97 stars 25 forks source link

npm install failure #6

Open marknorgren opened 10 years ago

marknorgren commented 10 years ago

I think this issue is similar to https://github.com/Orion98MC/node_rrd/issues/1

I had to install librrd-dev to get the npm install to work.

Is there a way to avoid having to install librrd-dev manually?

error output:

> rrd@0.0.5 install /home/pi/PiTherm/node_modules/rrd
> node-gyp rebuild

make: Entering directory `/home/pi/PiTherm/node_modules/rrd/build'
  CXX(target) Release/obj.target/rrd_bindings/src/node_rrd_create.o
In file included from ../src/node_rrd_create.cc:27:0:
../src/node_rrd.h:32:17: fatal error: rrd.h: No such file or directory
compilation terminated.
make: *** [Release/obj.target/rrd_bindings/src/node_rrd_create.o] Error 1
make: Leaving directory `/home/pi/PiTherm/node_modules/rrd/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.6.11+
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/PiTherm/node_modules/rrd
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! rrd@0.0.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the rrd@0.0.5 install script.
npm ERR! This is most likely a problem with the rrd 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 rrd
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.6.11+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/pi/PiTherm
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/PiTherm/npm-debug.log
npm ERR! not ok code 0
techedemic commented 5 years ago

I have the same issue on Ubuntu 18.04 LTS with NodeJS 8.9.4

techedemic commented 5 years ago

I have the same issue on Ubuntu 18.04 LTS with NodeJS 8.9.4

Fixed by installing librrd as follows: sudo apt install librrd-dev and then re-running npm install .