kelly / node-i2c

Node.js native bindings for i2c-dev. Plays well with Raspberry Pi and Beaglebone.
Other
216 stars 91 forks source link

Problem compiling on Pi 2 #64

Closed RaananW closed 9 years ago

RaananW commented 9 years ago

Hi, I am trying to build node i2c on the pi 2 with no success. I am using 0.10.28 but have tried different target for node-gyp (including 0.8.0 and 0.10.4) but couldn't get it to compile. The same thing happens when I download the latest master and compile using node-gyp standalone. This is the error message: (full message here - http://pastebin.com/8Y2WUdB1)

gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/opt/node/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:807:12) gyp ERR! System Linux 3.18.14-v7+ gyp ERR! command "node" "/opt/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /opt/node/lib/node_modules/i2c gyp ERR! node -v v0.10.28 gyp ERR! node-gyp -v v0.13.0 gyp ERR! not ok npm ERR! i2c@0.2.1 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the i2c@0.2.1 install script. npm ERR! This is most likely a problem with the i2c 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 i2c npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.18.14-v7+ npm ERR! command "/opt/node/bin/node" "/opt/node/bin/npm" "install" "-g" "i2c" npm ERR! cwd /home/pi/tmp npm ERR! node -v v0.10.28 npm ERR! npm -v 1.4.9 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/pi/tmp/npm-debug.log npm ERR! not ok code 0

Any help will be appreciated!!

kelly commented 9 years ago

If you're using node 0.11 or under you need to use i2c version 0.1.8.