beta-tester
Posts: 1562
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

apt install nodered fails (nodered_2.2.3-2_armhf.deb)

Sun Mar 26, 2023 9:36 am

hi,
i tried to install nodered from the raspberry pi/debian repository to my raspberry pi 3.
but i get an error:

Code: Select all

admin@test:~ $ sudo apt install nodered
...
0 aktualisiert, 179 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen 24,1 MB an Archiven heruntergeladen werden.
Nach dieser Operation werden 137 MB Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n] 
J
...
Vormals nicht ausgewähltes Paket nodejs-doc wird gewählt.
Vorbereitung zum Entpacken von .../176-nodejs-doc_12.22.12~dfsg-1~deb11u3_all.de
b ...
Entpacken von nodejs-doc (12.22.12~dfsg-1~deb11u3) ...
Vormals nicht ausgewähltes Paket npm wird gewählt.
Vorbereitung zum Entpacken von .../177-npm_7.5.2+ds-2_all.deb ...
Entpacken von npm (7.5.2+ds-2) ...
Vormals nicht ausgewähltes Paket nodered wird gewählt.
Vorbereitung zum Entpacken von .../178-nodered_2.2.3-2_armhf.deb ...
dpkg: Fehler beim Bearbeiten des Archivs /tmp/apt-dpkg-install-XdlN2J/178-nodere
d_2.2.3-2_armhf.deb (--unpack):
 »neues nodered-Skript des Paketes pre-installation«-Unterprozess gab den Fehler
wert 5 zurück
Fehler traten auf beim Bearbeiten von:
 /tmp/apt-dpkg-install-XdlN2J/178-nodered_2.2.3-2_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Code: Select all

admin@test:~ $ sudo apt install nodered
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Die folgenden NEUEN Pakete werden installiert:
  nodered
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
178 nicht vollständig installiert oder entfernt.
Es müssen noch 0 B von 8.348 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 69,9 MB Plattenplatz zusätzlich benutzt.
(Lese Datenbank ... 121064 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../nodered_2.2.3-2_armhf.deb ...
dpkg: Fehler beim Bearbeiten des Archivs /var/cache/apt/archives/nodered_2.2.3-2
_armhf.deb (--unpack):
 »neues nodered-Skript des Paketes pre-installation«-Unterprozess gab den Fehler
wert 5 zurück
Fehler traten auf beim Bearbeiten von:
 /var/cache/apt/archives/nodered_2.2.3-2_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Code: Select all

admin@test:~ $ uname -a
Linux test 6.1.19-v7+ #1637 SMP Tue Mar 14 11:04:52 GMT 2023 armv7l GNU/Linux

Code: Select all

admin@test:~ $ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
any idea what is going wrong here?
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

PhL91
Posts: 80
Joined: Thu Dec 16, 2021 10:21 am

Re: apt install nodered fails (nodered_2.2.3-2_armhf.deb)

Sun Mar 26, 2023 12:01 pm

Hello,

No space on device?
Use "df -h" to display the space on each device

danjperron
Posts: 4383
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: apt install nodered fails (nodered_2.2.3-2_armhf.deb)

Sun Mar 26, 2023 12:25 pm

I prefer to install nodered that way

Code: Select all

sudo apt install build-essential git curl
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
ref:https://nodered.org/docs/getting-started/raspberrypi

User avatar
neilgl
Posts: 6093
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: apt install nodered fails (nodered_2.2.3-2_armhf.deb)

Sun Mar 26, 2023 2:53 pm

Yes, install it as danjperron said.
The apt method fails as it tries to install node.js V12 which node-red no longer supports. The script installs node.js V16.9.1

User avatar
craigevil
Posts: 468
Joined: Wed Jan 27, 2021 5:22 am
Location: heaven

Re: apt install nodered fails (nodered_2.2.3-2_armhf.deb)

Sun Mar 26, 2023 3:05 pm

Or you can use nvm and install either the current nodejs LTS 18.5.0 or the current nodejs release 19.8.1.
Along with the newest version of npm 9.6.2.
https://heynode.com/tutorial/install-no ... cally-nvm/

Then use the node-red script.
https://nodered.org/docs/getting-started/raspberrypi
Raspberry PI 400 Raspberry Pi OS (Debian Sid) Kernel: 6.1.31-v8+ aarch64 DE: XFCE 4.18
Debian - "If you can't apt install something, it isn't useful or doesn't exist"

beta-tester
Posts: 1562
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: apt install nodered fails (nodered_2.2.3-2_armhf.deb)

Sun Mar 26, 2023 6:55 pm

PhL91 wrote:
Sun Mar 26, 2023 12:01 pm
Hello,

No space on device?
Use "df -h" to display the space on each device

Code: Select all

:~ $ df -h
Dateisystem    Größe Benutzt Verf. Verw% Eingehängt auf
/dev/root        59G     24G   32G   43% /
devtmpfs        333M       0  333M    0% /dev
tmpfs           461M       0  461M    0% /dev/shm
tmpfs           185M    2,1M  183M    2% /run
tmpfs           5,0M    4,0K  5,0M    1% /run/lock
/dev/mmcblk0p1  253M     51M  202M   20% /boot
tmpfs            93M     28K   93M    1% /run/user/1000
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

beta-tester
Posts: 1562
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: apt install nodered fails (nodered_2.2.3-2_armhf.deb)

Sun Mar 26, 2023 7:06 pm

danjperron wrote:
Sun Mar 26, 2023 12:25 pm
I prefer to install nodered that way

Code: Select all

sudo apt install build-essential git curl
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
ref:https://nodered.org/docs/getting-started/raspberrypi
ok, thank you, i used that installation method with the script and all went fine.

but in the note is written that the apt method should work, even it will install an older version of node-red and node-js.
(even it is not recommended anymore)
Node-RED has also been packaged for the Raspberry Pi OS repositories and appears in their list of 'Recommended Software'. This allows it to be installed using apt-get install nodered and includes the Raspberry Pi OS-packaged version of Node.js, but does not include npm.
Note: at this time the default node.js included with RaspiOS Bullseye is still v12. This means that the latest Node-RED version that can be installed is the 2.x branch. While using these packages is convenient at first, we strongly recommend using the install script above instead.
in my opinion, when there is a package listed in the official apt repository, it should install correctly with all its dependencies. doesn't matter which version it will install and depends on. when a package isn't working, it should not be in the list of installable packages.
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

User avatar
neilgl
Posts: 6093
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: apt install nodered fails (nodered_2.2.3-2_armhf.deb)

Sun Mar 26, 2023 9:53 pm

Might be an error / known issue.

Return to “Troubleshooting”