bpmurray / node-red-contrib-dht-sensor

Node-RED node to process DHT11/22 sensor data
Apache License 2.0
7 stars 8 forks source link

Permission Error #9

Closed Ch3fk0ch88 closed 7 years ago

Ch3fk0ch88 commented 7 years ago

Hi, i trie to install it, but i all time get this error:

root@raspberrypi:/home/pi/.node-red# sudo npm install -g node-dht-sensor
/
> node-dht-sensor@0.0.32 preinstall /usr/lib/node_modules/node-dht-sensor
> ./check-lib.sh

Library bcm2835 found.

> node-dht-sensor@0.0.32 install /usr/lib/node_modules/node-dht-sensor
> node-gyp configure

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.7.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/node-dht-sensor/.node-gyp"

> node-dht-sensor@0.0.32 postinstall /usr/lib/node_modules/node-dht-sensor
> node-gyp build

make: Entering directory '/usr/lib/node_modules/node-dht-sensor/build'
make: *** No rule to make target '../.node-gyp/4.7.2/include/node/common.gypi', needed by 'Makefile'.  Stop.
make: Leaving directory '/usr/lib/node_modules/node-dht-sensor/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:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Linux 4.4.38-v7+
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /usr/lib/node_modules/node-dht-sensor
gyp ERR! node -v v4.7.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 4.4.38-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "node-dht-sensor"
npm ERR! node v4.7.2
npm ERR! npm  v2.15.11
npm ERR! code ELIFECYCLE

npm ERR! node-dht-sensor@0.0.32 postinstall: `node-gyp build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-dht-sensor@0.0.32 postinstall script 'node-gyp build'.
npm ERR! This is most likely a problem with the node-dht-sensor package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-dht-sensor
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls node-dht-sensor
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pi/.node-red/npm-debug.log
root@raspberrypi:/home/pi/.node-red# ^C
root@raspberrypi:/home/pi/.node-red#
bpmurray commented 7 years ago

OK, this is a well-known limitation of npm. You can do one of three things: