kelly / node-i2c

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

Unable to install on Raspberry Pi 3 running Raspbian Jessie #80

Closed thelonious closed 7 years ago

thelonious commented 7 years ago

It looks like I'm running node v0.10.29 and npm 1.4.21. When I run sudo npm install i2c I get the following:

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/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:809:12)
gyp ERR! System Linux 4.4.13-v7+
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/Documents/node/node_modules/i2c
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! i2c@0.2.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the i2c@0.2.3 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 4.4.13-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "i2c"
npm ERR! cwd /home/pi/Documents/node
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/Documents/node/npm-debug.log
npm ERR! not ok code 0

Thanks for any suggestions on how to get around this.

nielsnl68 commented 7 years ago

As the readme says, this version does not support the node.js version you use. Upgrade node.js to 4.6 or use the 0.18 version of i2c.

thelonious commented 7 years ago

Ah, yes. I didn't read down that far. It's too bad the default experience on Raspian isn't nicer for node. I've switched over to Python for now. Thanks!

nielsnl68 commented 7 years ago

Why not upgrading nodejs to 4.6 or above?

Op 8 okt. 2016 16:12 schreef "Kevin Lindsey" notifications@github.com:

Closed #80 https://github.com/kelly/node-i2c/issues/80.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kelly/node-i2c/issues/80#event-817097042, or mute the thread https://github.com/notifications/unsubscribe-auth/AEhQT175mCtBf9gKUIPq-CQCMGsfack0ks5qx6SzgaJpZM4J5lP3 .

thelonious commented 7 years ago

I ran out of time with that project and needed a solution right then. I may give node a try next time around. FWIW, I have 'n' running now, so it's easy switch versions. I was able to build i2c with 5.12.0 and 6.6.0 just fine on the Pi 3.