kelly / node-i2c

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

installation error #95

Closed mshaz closed 5 years ago

mshaz commented 5 years ago

Hi

I need help on this. I need to install i2c before using PCA9685 node for node-red. I tried --unsafe-perm also did not work.

Thank you

pi@raspberrypi:~ $ sudo npm install -g i2c npm WARN deprecated coffee-script@1.9.1: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)

i2c@0.2.3 install /usr/lib/node_modules/i2c node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/10.15.3" gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp" gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/i2c/build' gyp ERR! System Linux 4.14.98-v7+ gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/lib/node_modules/i2c gyp ERR! node -v v10.15.3 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 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 probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-04-06T16_00_49_072Z-debug.log

kelly commented 5 years ago

This is a permission issue. Not an issue with this library.