Install Node-Red

I don't understand what that means.

I don't think it was ever comprehensible to me. But there would be a point in investigating further, so that the next time someone reports the error we will know what the cause is, But unless you can tell us exactly what you did then it is not possible.

yes, I agree with you, but I can't say why it happened that way

the real reason was this message that I received when using this script in "Getting startet.... Running on Raspberry Pi"

bash: /def/fd/63: No such file or directory

  • there are no further informations to handle this
  • why it worked perfectly with today's new installation, I can't explain, why...!
    (sorry, my english is not perfect!)

The question that is unanswered is what did you do different the first time? What was the difference between the first and second installation?

the only difference was that I did the first installation directly on the RPi keyboard
today's installation via SSH from Mac, of course with the script via copy/paste
(I can rule out any typos)

Was it exactly the same OS image?
In either case did you do anything after plugging in the freshly burned SD before running the script.

In the first case, before burning adjustments such as hostname, user, password, SSH
today in the new attempt only the system (RPi 2) and OS (Legacy 32-bit light), otherwise noting
In the first case, various adjustments in raspi-config and then the installation directly on the RPi
Today's installation, as already mentioned, via SSH and Mac

What OS was it the first time?

OS 32-bit Debian Bookworm (Recommended)

Right at the start you said you had manually installed nodejs before running the script.

yes, after I got the mentioned error message when running this bash script (bash: /def/fd/63: No such file or directory) in the opinion that npm and nodejs must be installed first (trying, trying, trying...)

As I said before, that does not tell you to install npm.

It would be helpful if you could try again with the 32 bit bookworm install and see if you can replicate the problem. I haven't got the hardware to try it myself at the moment.

I suspect this is more to do with some accidental operator error rather than anything Node-RED related - eg see command line - "/dev/fd/63 No such file or directory" - Ask Ubuntu and other searches for /dev/fd/63 ... so I'm not sure it's worth losing sleep over.

So do I, that is why it would be good if the OP could try again to see if it is reproducible.

I managed to bring together a Pi B+ and a wifi dongle so it's even older than the OP's Pi 2:

Burned RPiOS 32 bit (bookworm, not legacy) and ran the script with no command line options. It seems to be working fine:

pi@TestOS:~ $ grep PRETTY_NAME /etc/os-release | cut -d \" -f 2
Raspbian GNU/Linux 12 (bookworm)
pi@TestOS:~ $ cat /sys/firmware/devicetree/base/model
Raspberry Pi Model B Plus Rev 1.2
pi@TestOS:~ $ npm -v
10.8.2
pi@TestOS:~ $ node-red
25 Aug 20:25:16 - [info]

Welcome to Node-RED
===================

25 Aug 20:25:16 - [info] Node-RED version: v4.0.2
25 Aug 20:25:16 - [info] Node.js  version: v20.17.0
25 Aug 20:25:16 - [info] Linux 6.6.31+rpt-rpi-v6 arm LE
25 Aug 20:25:22 - [info] Loading palette nodes
25 Aug 20:25:42 - [info] Settings file  : /home/pi/.node-red/settings.js
25 Aug 20:25:42 - [info] Context store  : 'default' [module=memory]
25 Aug 20:25:42 - [info] User directory : /home/pi/.node-red
25 Aug 20:25:42 - [warn] Projects disabled : editorTheme.projects.enabled=false
25 Aug 20:25:42 - [info] Flows file     : /home/pi/.node-red/flows.json
25 Aug 20:25:42 - [info] Creating new flow file
25 Aug 20:25:42 - [warn] Using unencrypted credentials
25 Aug 20:25:42 - [info] Server now running at http://127.0.0.1:1880/
25 Aug 20:25:42 - [info] Starting flows
25 Aug 20:25:42 - [info] Started flows

That's good to know. So that is Bookworm, nodejs 20 and old Pi hardware installing and running fine with the script. Excellent.

I can confirm.
See: Pi Zero W fail to install Node-Red - #5 by Colin

ERROR message /dev/fd/63

This error means that curl failed to download the script and there was no input to pass to bash from stdout.

There is no error message because curl is passed the -s flag to be silent.

The usual cause for this error will be a network problem on the device, possibly a DNS lookup failure. The other cause can be trying to run the command with sudo, this will NOT work as it runs bash as root, but runs curl as the local user and can't pipe the stdout output to the process running as a different user.

The correct debug for this situation in future is to run just the curl command without the -s e.g.

curl -L https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered

if this outputs the script then add -o nr-install.sh to the end to save it to a file locally and run with

bash ./nr-install.sh <any args>
2 Likes

I am not seeing that. When I run the script on Ubuntu with the network disconnected it just returns immediately with no output.

In fact possibly a good plan when there are reported problems is to run the full command, but without the -s so that there is at least confirmation that it has downloaded.
bash <(curl -L https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered )

Same on a Pi with a typo in "githubusercontent.com". I guess that's equivalent to
bash <(false)
The Bash exit code $? in this case is 0

But with a typo in the name of the script I get
/dev/fd/63: line 1: 404:: command not found

Which is similar but not identical to the error reported by the OP, presumably because he did things slightly differently.

The 404 is of course the HTML status code "404 Not Found"

@dceejay do you think it worthwhile to tweek the script to first of all print "Node-RED Installation" and the documentation to say "If you do not see 'Node-RED Installation' you may have a problem with your internet connection, please check and try again"?

Could do I suppose - not sure how wide a problem it is to be honest. Pull Requests always welcome.