# DHT Sensor error

**URL:** <https://discourse.nodered.org/t/dht-sensor-error/4368>\
**Category:** General\
**Created:** [28 October 2018 21:24 UTC](https://discourse.nodered.org/t/dht-sensor-error/4368 "2018-10-28T21:24:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pac8](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@Pac8](https://discourse.nodered.org/u/Pac8)\
**Post date:** [28 October 2018 21:24 UTC](https://discourse.nodered.org/t/dht-sensor-error/4368/1 "2018-10-28T21:24:25Z")

</div>

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/](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

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [28 October 2018 21:30 UTC](https://discourse.nodered.org/t/dht-sensor-error/4368/2 "2018-10-28T21:30:22Z")

</div>

> [@Pac8](#):
>
> Make sure you follow instructions from [bcm2835: C library for Broadcom BCM 2835 as used in Raspberry Pi](http://www.airspayce.com/mikem/bcm2835/) |↵| to install the BCM2835 library on your system first then install this addon.

might be a clue, read the readme on [flows.nodered.org](http://flows.nodered.org) install any additional libraries you need and then try installing the node

---

<div class="post-metadata">

**Author:** ![Pac8](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@Pac8](https://discourse.nodered.org/u/Pac8)\
**Post date:** [28 October 2018 22:17 UTC](https://discourse.nodered.org/t/dht-sensor-error/4368/3 "2018-10-28T22:17:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [29 October 2018 08:29 UTC](https://discourse.nodered.org/t/dht-sensor-error/4368/4 "2018-10-29T08:29:43Z")

</div>

From the nodes Readme:

Installing this node requires three steps:

- Install the BCM2835 library from [here]  
([http://www.airspayce.com/mikem/bcm2835/](http://www.airspayce.com/mikem/bcm2835/)).

- Install the node-dht-sensor dependency

```auto
sudo npm install --unsafe-perm -g node-dht-sensor

```

- Install this node

```auto
sudo npm install --unsafe-perm -g node-red-contrib-dht-sensor

```

Have you installed the node-dht-sensor dependency?
