If you wish to stay on nodejs 12 you can update to the latest Node-RED 1.x or 2.x version by adding
--nodered-version="1.3.7" or --nodered-version="2.2.2" to that install command. If in doubt this is the safer option.
In the meantime I read the logs and came to the same conclusion. He did not find the repos.
I had to edit the debian sources.list and rerun update & full-upgrade.
After reading the install.log I started the install process manually and get:
root@nas:~# sudo apt-get install nodejs
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Die folgenden NEUEN Pakete werden installiert:
nodejs
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen 27,2 MB an Archiven heruntergeladen werden.
Nach dieser Operation werden 128 MB Plattenplatz zusätzlich benutzt.
Holen:1 https://deb.nodesource.com/node_16.x stretch/main amd64 nodejs amd64 16.20.2-1nodesource1 [27,2 MB]
Fehl:1 https://deb.nodesource.com/node_16.x stretch/main amd64 nodejs amd64 16.20.2-1nodesource1
Writing more data than expected (27212228 > 27210210)
Hashes of expected file:
- SHA256:80730cbf61c72b9cf55435cdf8bef44a865cd797bdf4b62b7e3a9151568a0a17
- SHA1:f3ce40f55d97d4582eed117e4d26fdaa09d46a32 [weak]
- MD5Sum:94cdd9c58e730374a1cf2c818e8ecedb [weak]
- Filesize:27210210 [weak]
E: Fehlschlag beim Holen von https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.20.2-1nodesource1_amd64.deb Writing more data than expected (27212228 > 27210210)
Hashes of expected file:
- SHA256:80730cbf61c72b9cf55435cdf8bef44a865cd797bdf4b62b7e3a9151568a0a17
- SHA1:f3ce40f55d97d4582eed117e4d26fdaa09d46a32 [weak]
- MD5Sum:94cdd9c58e730374a1cf2c818e8ecedb [weak]
- Filesize:27210210 [weak]
I also changed the default gateway, since I have two different routers here to exclude the possibility that the Firewall changes any files.
If I use the instructions on GitHub - nodesource/distributions: NodeSource Node.js Binary Distributions I could install Node.js 16 and afterwards run the PI script.
If I omit the --node16 parameter, the script installs Node-RED 3.1 with the existing Node.js 16.
But if I use the --node16 parameter, the script stops again.
Holen:1 https://deb.nodesource.com/node_16.x stretch/main amd64 nodejs amd64 16.20.2-1nodesource1 [27,2 MB]
Fehl:1 https://deb.nodesource.com/node_16.x stretch/main amd64 nodejs amd64 16.20.2-1nodesource1
Writing more data than expected (27220422 > 27210210)
Hashes of expected file:
- SHA256:80730cbf61c72b9cf55435cdf8bef44a865cd797bdf4b62b7e3a9151568a0a17
- SHA1:f3ce40f55d97d4582eed117e4d26fdaa09d46a32 [weak]
- MD5Sum:94cdd9c58e730374a1cf2c818e8ecedb [weak]
- Filesize:27210210 [weak]
E: Fehlschlag beim Holen von https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.20.2-1nodesource1_amd64.deb Writing more data than expected (27220422 > 27210210)
Hashes of expected file:
- SHA256:80730cbf61c72b9cf55435cdf8bef44a865cd797bdf4b62b7e3a9151568a0a17
- SHA1:f3ce40f55d97d4582eed117e4d26fdaa09d46a32 [weak]
- MD5Sum:94cdd9c58e730374a1cf2c818e8ecedb [weak]
- Filesize:27210210 [weak]
E: Einige Archive konnten nicht heruntergeladen werden; vielleicht »apt-get update« ausführen oder mit »--fix-missing« probieren?
Versions: node:missing npm:missing
Already have nodejs v16.20.2
OLD nodejs 16 :
NEW nodejs :
But I also see this warning in the log:
SCRIPT DEPRECATION WARNING
This script, located at https://deb.nodesource.com/setup_X, used to
install Node.js is deprecated now and will eventually be made inactive.
Please visit the NodeSource distributions Github and follow the
instructions to migrate your repo.
https://github.com/nodesource/distributions
The NodeSource Node.js Linux distributions GitHub repository contains
information about which versions of Node.js and which Linux distributions
are supported and how to install it.
https://github.com/nodesource/distributions
SCRIPT DEPRECATION WARNING
So the issue is solved for me if I use this order.
But maybe the PI script from nodered.org is not perfect anymore, since the script from nodesource.com claims the above warning: "SCRIPT DEPRECATION WARNING"