# Raspberry pi on Bookworm

**URL:** <https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023>\
**Category:** General\
**Created:** [25 December 2023 15:02 UTC](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023 "2023-12-25T15:02:36Z")\
**Posts on this page:** 14\
**Page:** 2

<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:** [31 December 2023 13:28 UTC](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023/21 "2023-12-31T13:28:05Z")

</div>

Can you run  
`sudo apt update`  
and show us what you see?

---

<div class="post-metadata">

**Author:** ![PizzaProgram](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pizzaprogram/32/19431_2.png) [@PizzaProgram](https://discourse.nodered.org/u/PizzaProgram)\
**Post date:** [1 January 2024 06:45 UTC](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023/22 "2024-01-01T06:45:56Z")

</div>

```bash
pi@oh:~ $ sudo apt update
Találat:1 http://deb.debian.org/debian bookworm InRelease
Letöltés:2 http://deb.debian.org/debian-security bookworm-security InRelease [48,0 kB]
Letöltés:3 http://deb.debian.org/debian bookworm-updates InRelease [52,1 kB]
Találat:4 https://download.docker.com/linux/debian bookworm InRelease
Találat:5 https://deb.nodesource.com/node_18.x nodistro InRelease
Találat:6 http://archive.raspberrypi.com/debian bookworm InRelease
Letöltve 100 kB 2mp alatt (49,5 kB/s)
Csomaglisták olvasása... Kész
Függőségi fa építése... Kész
Állapotinformációk olvasása... Kész
Minden csomag naprakész.

```

Means all packages are up to date.

---

<div class="post-metadata">

**Author:** ![PizzaProgram](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pizzaprogram/32/19431_2.png) [@PizzaProgram](https://discourse.nodered.org/u/PizzaProgram)\
**Post date:** [1 January 2024 07:02 UTC](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023/23 "2024-01-01T07:02:50Z")

</div>

Also it would be nice, if the install script would ask at the end :

1. Should node-red auto-start as a daemon every time the RPi starts?
2. Just start now here in this console?
3. I will start it manually later by typing "node-red"

I know it requires sudo to create an auto-starting daemon, so maybe if the interactive question is YES, than it should download a secondary bash to execute it separately, and ask for a sudo password?

---

<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:** [1 January 2024 09:14 UTC](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023/24 "2024-01-01T09:14:44Z")

</div>

> [@PizzaProgram](#):
>
> `Találat:5 https://deb.nodesource.com/node_18.x nodistro InRelease`

So it has enabled the nodesource repository. What does this command show?  
`apt policy nodejs`

---

<div class="post-metadata">

**Author:** ![PizzaProgram](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pizzaprogram/32/19431_2.png) [@PizzaProgram](https://discourse.nodered.org/u/PizzaProgram)\
**Post date:** [1 January 2024 09:49 UTC](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023/25 "2024-01-01T09:49:51Z")

</div>

```auto
pi@oh:~ $ apt policy nodejs
nodejs:
  Telepítve: 18.19.0+dfsg-6~deb12u1
  Jelölt: 18.19.0+dfsg-6~deb12u1
  Verziótáblázat:
 *** 18.19.0+dfsg-6~deb12u1 500
        500 http://deb.debian.org/debian-security bookworm-security/main arm64 Packages
        100 /var/lib/dpkg/status
     18.19.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.18.2-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.18.1-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.18.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.17.1-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.17.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.16.1-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.16.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.15.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.14.2-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.14.1-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.14.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.13.0+dfsg1-1 500
        500 http://deb.debian.org/debian bookworm/main arm64 Packages
     18.13.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.12.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.11.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.10.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.9.1-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.9.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.8.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.7.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.6.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.5.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.4.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.3.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.2.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.1.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages
     18.0.0-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x nodistro/main arm64 Packages

```

Telepítve: 18.19.0+dfsg-6~deb12u1 \<\< Means : **Installed**  
Jelölt: 18.19.0+dfsg-6~deb12u1 \<\< Means: **Marked**

---

<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:** [1 January 2024 11:58 UTC](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023/26 "2024-01-01T11:58:17Z")

</div>

That is a nuisance, the bookworm repository has the same version as nodejs and it is picking up the one from the debian repo, which does not include npm. I don't think there is much the script can do about that.  
If you ran the script with `--node20` then there would not be a problem.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [1 January 2024 12:10 UTC](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023/27 "2024-01-01T12:10:48Z")

</div>

FYI - I just tried installing NR on my Pi5/bookworm and got the same issue

```auto
Running Node-RED install for user pi at /home/pi on debian

This can take 20-30 minutes on the slower Pi versions - please wait.

  Stop Node-RED âœ”
  Remove old version of Node-RED âœ”
  Remove old version of Node.js âœ” 18.19.0-1nodesource1
  Install Node 18.19.0+dfsg-6~deb12u1 âœ˜ Bad install: Node.js v18.19.0 Npm missing - Exit
  Clean npm cache                     
  Install Node-RED core               
  Move global nodes to local          
  Npm rebuild existing nodes          
  Install extra Pi nodes              
  Add shortcut commands               
  Update systemd script               
                                      

Any errors will be logged to /var/log/nodered-install.log

```

---

<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:** [1 January 2024 12:39 UTC](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023/28 "2024-01-01T12:39:32Z")

</div>

Is it ok if you specify `--node20`

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [1 January 2024 13:06 UTC](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023/29 "2024-01-01T13:06:35Z")

</div>

That worked fine 🙂

```auto
Running Node-RED install for user pi at /home/pi on debian

This can take 20-30 minutes on the slower Pi versions - please wait.

  Stop Node-RED âœ”
  Remove old version of Node-RED âœ”
  Remove old version of Node.js âœ” 18.19.0+dfsg-6~deb12u1
  Install Node 20.10.0-1nodesource1 âœ” v20.10.0 Npm 10.2.3
  Clean npm cache âœ”
  Install Node-RED core âœ” 3.1.3
  Move global nodes to local -
  Npm rebuild existing nodes âœ”
  Install extra Pi nodes âœ”
  Add shortcut commands âœ”
  Update systemd script âœ”

```

---

<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:** [1 January 2024 16:24 UTC](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023/30 "2024-01-01T16:24:07Z")

</div>

Script should be fixed now - so default of node 18 should now work on bookworm 64bit.

---

<div class="post-metadata">

**Author:** ![parasaurolophus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/parasaurolophus/32/18729_2.png) [@parasaurolophus](https://discourse.nodered.org/u/parasaurolophus)\
**Post date:** [1 January 2024 18:42 UTC](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023/31 "2024-01-01T18:42:46Z")

</div>

An issue I have observed with bookworm on a pi4/400 (haven’t got a pi5 on which to compare) is that nodes which use serial devices (e.g. USB z-wave / zigbee dongles) fail to handle flow restarts / deployments correctly. After restarting the serial port appears locked within the flow even though it is the nodered process that locked it. Restarting the process fixes it until the next deployment. This affects both the built in serial in / out nodes as well as contributed nodes that open serial ports

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [1 January 2024 19:34 UTC](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023/32 "2024-01-01T19:34:54Z")

</div>

Do you happen to be on Node20?

I ask, as the popular node js module **serialport** seems to have popped up with that issue under node 20, and this module is used to drive nodes that need serial port.

I had users reporting that issue to me (zwave js node red module) and downgrading to node 18 sorts it. I believe it’s upstream with **serialport** and Node20

**EDIT**  
just checked the **serialport** repo - and a few reports under Node20 share the same experience.

When a serial port is closed, it cannot be re-opened

**Error Resource temporarily unavailable Cannot lock port**

I think the devs are looking to fix it soon, and it appears to have surfaced under Node20

Example report: [Cannot reconnect to port on linux, OSX is working fine · Issue #2685 · serialport/node-serialport · GitHub](https://github.com/serialport/node-serialport/issues/2685)

---

<div class="post-metadata">

**Author:** ![parasaurolophus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/parasaurolophus/32/18729_2.png) [@parasaurolophus](https://discourse.nodered.org/u/parasaurolophus)\
**Post date:** [1 January 2024 20:33 UTC](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023/33 "2024-01-01T20:33:50Z")

</div>

Yep. And it was actually your zwave-js node in which I first noticed it. I assumed it was some upstream related issue since it appeared to affect all nodes that use serial ports, not just yours nor only with certain devices. Not an issue worth downgrading for me personally and hopefully it will get fixed sooner than later 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [15 January 2024 20:33 UTC](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023/34 "2024-01-15T20:33:53Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/raspberry-pi-on-bookworm/84023.md?page=1)
