DHT Sensor error

#1

Can any one help with below error codes when installing DHT node for pi3.
Many thanks

Installation of module node-red-contrib-dht-sensor failed:"

10/28/2018, 9:14:55 PMmsg : string[42]

"------------------------------------------"

10/28/2018, 9:14:55 PMmsg : string[14122]

"↵> node-dht-sensor@0.0.34 preinstall /home/pi/.node-red/node_modules/node-dht-sensor↵> ./check-lib.sh↵↵+--------------------------------------------------------------------------------+↵| e[1;31mERROR: Library BCM2835 not found!e[0m |↵| Make sure you follow instructions from http://www.airspayce.com/mikem/bcm2835/ |↵| to install the BCM2835 library on your system first then install this addon. |↵+--------------------------------------------------------------------------------+↵↵> node-dht-sensor@0.0.34 install /home/pi/.node-red/node_modules/node-dht-sensor↵> node-gyp configure↵↵↵> node-dht-sensor@0.0.34 postinstall /home/pi/.node-red/node_modules/node-dht-sensor↵> node-gyp build↵↵make: Entering directory '/home/pi/.node-red/node_modules/node-dht-sensor/build'↵ CXX(target) Release/obj.target/node_dht_sensor/node-dht-sensor.o↵In file included from ../../nan/nan_new.h:189:0,↵ from ../../nan/nan.h:203,↵ from ...."

10/28/2018, 9:14:55 PM

0 Likes

#2

might be a clue, read the readme on flows.nodered.org install any additional libraries you need and then try installing the node

0 Likes

#3

I have tried installing the library for this sensor with the sudo command but keep getting a lot of errors and it will not install for me.

compilation terminated.
node_dht_sensor.target.mk:102: recipe for target 'Release/obj.target/node_dht_sensor/dht-sensor.o' failed
make: *** [Release/obj.target/node_dht_sensor/dht-sensor.o] Error 1
make: Leaving directory '/usr/local/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:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.14.71-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /usr/local/lib/node_modules/node-dht-sensor
gyp ERR! node -v v10.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
[ ......] / postinstall: info lifecycle node-dht-sensor@0.0.34~postinnpm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-dht-sensor@0.0.34 postinstall: node-gyp build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-dht-sensor@0.0.34 postinstall 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/2018-10-28T22_15_45_691Z-debug.log

0 Likes

#4

From the nodes Readme:

Installing this node requires three steps:

sudo npm install --unsafe-perm -g node-dht-sensor
  • Install this node
sudo npm install --unsafe-perm -g node-red-contrib-dht-sensor

Have you installed the node-dht-sensor dependency?

0 Likes