# Upgrade on Raspberry Pi hang or loop

**URL:** https://discourse.nodered.org/t/upgrade-on-raspberry-pi-hang-or-loop/10916
**Category:** General
**Created:** [8 May 2019 10:21 UTC](https://discourse.nodered.org/t/upgrade-on-raspberry-pi-hang-or-loop/10916 "2019-05-08T10:21:38Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![webtour](https://avatars.discourse-cdn.com/v4/letter/w/a4c791/32.png) [@webtour](https://discourse.nodered.org/u/webtour)
#### Post date: [8 May 2019 10:21 UTC](https://discourse.nodered.org/t/upgrade-on-raspberry-pi-hang-or-loop/10916/1 "2019-05-08T10:21:38Z")

</div>

Hi,  
I have a raspberry Pi 3 with the raspbian image from last year installed.  
When I want to upgarde the node-red software with this command:

```auto
bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)

```

The script hangs.  
Then I found this help note in the forum:  
Stop node red then uninstall node 8.x  
`sudo apt-get remove nodejs`  
then remove the node 8.x repository spec  
`sudo rm /etc/apt/sources.list.d/nodesource.list`  
Then re-run the script.

But the script hang at the point "install NODE.js LTS"  
The last Entry in the Logfile was:  
Trigger für man-db (2.7.6.1-2) werden verarbeitet

What could I do now?  
Holger

---

<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: [8 May 2019 10:25 UTC](https://discourse.nodered.org/t/upgrade-on-raspberry-pi-hang-or-loop/10916/2 "2019-05-08T10:25:24Z")

</div>

try installing nodejs yourself and then try again

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [8 May 2019 10:39 UTC](https://discourse.nodered.org/t/upgrade-on-raspberry-pi-hang-or-loop/10916/3 "2019-05-08T10:39:24Z")

</div>

How long did you leave it?

---

<div class="post-metadata">

### Author: ![webtour](https://avatars.discourse-cdn.com/v4/letter/w/a4c791/32.png) [@webtour](https://discourse.nodered.org/u/webtour)
#### Post date: [8 May 2019 12:37 UTC](https://discourse.nodered.org/t/upgrade-on-raspberry-pi-hang-or-loop/10916/4 "2019-05-08T12:37:47Z")

</div>

Now the script finish the install process.  
Node-red work fine but I found some warning and error messages in the upgrade logfile:

> bcrypt\_lib.target.mk:107: die Regel für Ziel „Release/obj.target/bcrypt\_lib/src/bcrypt\_node.o“ scheiterte  
> make: \*\*\* [Release/obj.target/bcrypt\_lib/src/bcrypt\_node.o] Fehler 1  
> make: Verzeichnis „/usr/lib/node\_modules/node-red/node\_modules/bcrypt/build“ wird verlassen  
> 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:196:13)  
> gyp ERR! stack at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:257:12)  
> gyp ERR! System Linux 4.19.40-v7+  
> gyp ERR! command "/usr/bin/node" "/usr/lib/node\_modules/npm/node\_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/lib/node\_modules/node-  
> red/node\_modules/bcrypt/lib/binding/bcrypt\_lib.node" "--module\_name=bcrypt\_lib" "--module\_path=/usr/lib/node\_modules/node-red/node\_modules/bcrypt/lib/binding" "--napi  
> \_version=4" "--node\_abi\_napi=napi" "--napi\_build\_version=0" "--node\_napi\_label=node-v72"  
> gyp ERR! cwd /usr/lib/node\_modules/node-red/node\_modules/bcrypt  
> gyp ERR! node -v v12.2.0  
> gyp ERR! node-gyp -v v3.8.0  
> gyp ERR! not ok  
> node-pre-gyp ERR! build error  
> node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node\_modules/npm/node\_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/us  
> r/lib/node\_modules/node-red/node\_modules/bcrypt/lib/binding/bcrypt\_lib.node --module\_name=bcrypt\_lib --module\_path=/usr/lib/node\_modules/node-red/node\_modules/bcrypt/  
> lib/binding --napi\_version=4 --node\_abi\_napi=napi --napi\_build\_version=0 --node\_napi\_label=node-v72' (1)  
> node-pre-gyp ERR! stack at ChildProcess. (/usr/lib/node\_modules/node-red/node\_modules/node-pre-gyp/lib/util/compile.js:83:29)  
> node-pre-gyp ERR! stack at ChildProcess.emit (events.js:196:13)  
> node-pre-gyp ERR! stack at maybeClose (internal/child\_process.js:1011:16)  
> node-pre-gyp ERR! stack at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:268:5)  
> node-pre-gyp ERR! System Linux 4.19.40-v7+  
> node-pre-gyp ERR! command "/usr/bin/node" "/usr/lib/node\_modules/node-red/node\_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"  
> node-pre-gyp ERR! cwd /usr/lib/node\_modules/node-red/node\_modules/bcrypt  
> node-pre-gyp ERR! node -v v12.2.0  
> node-pre-gyp ERR! node-pre-gyp -v v0.12.0  
> node-pre-gyp ERR! not ok  
> Failed to execute '/usr/bin/node /usr/lib/node\_modules/npm/node\_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/lib/node\_modules/node-red/nod  
> e\_modules/bcrypt/lib/binding/bcrypt\_lib.node --module\_name=bcrypt\_lib --module\_path=/usr/lib/node\_modules/node-red/node\_modules/bcrypt/lib/binding --napi\_version=4 --  
> node\_abi\_napi=napi --napi\_build\_version=0 --node\_napi\_label=node-v72' (1)  
> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@3.0.5 (node\_modules/node-red/node\_modules/bcrypt):  
> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@3.0.5 install: `node-pre-gyp install --fallback-to-build`  
> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
> 
> - node-red@0.20.5  
> added 315 packages from 310 contributors in 645.119s  
> 0.20.5  
> Der Benutzer »pi« ist bereits ein Mitglied der Gruppe »gpio«.  
> Finished : Mi 8. Mai 12:32:12 CEST 2019

Is this a problem?  
I'm a beginner in linux  
Holger

---

<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: [8 May 2019 12:55 UTC](https://discourse.nodered.org/t/upgrade-on-raspberry-pi-hang-or-loop/10916/5 "2019-05-08T12:55:16Z")

</div>

You appear to have [quote="webtour, post:4, topic:10916"]  
node -v v12.2.0  
[/quote]  
installed which might be a problem with some nodes especially those which use the serial port.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [8 May 2019 14:41 UTC](https://discourse.nodered.org/t/upgrade-on-raspberry-pi-hang-or-loop/10916/6 "2019-05-08T14:41:28Z")

</div>

The script should not install node 12, earlier in the install log you should see it installing node, it should probably be 10.x. Can you see that bit of the log?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [8 May 2019 16:16 UTC](https://discourse.nodered.org/t/upgrade-on-raspberry-pi-hang-or-loop/10916/7 "2019-05-08T16:16:38Z")

</div>

Well having been advised to install nodejs manually they have done just that... so can't blame them for that.

---

<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: [8 May 2019 16:23 UTC](https://discourse.nodered.org/t/upgrade-on-raspberry-pi-hang-or-loop/10916/8 "2019-05-08T16:23:41Z")

</div>

The first paragraph of the installation page does say which nodejs version is recommended...

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [8 May 2019 16:38 UTC](https://discourse.nodered.org/t/upgrade-on-raspberry-pi-hang-or-loop/10916/9 "2019-05-08T16:38:18Z")

</div>

True, I missed that, I thought the script had just finished when @webtour waited a bit longer.
