Bash command get stuck when trying to install node red in raspberrypi

Hi,
Using bash script to install node red in raspberrypi but script gets stuck and does nothing.

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

Used alternative script as solution given to user who was facing similar issue but not worked for me.

Similar issue thread : //discourse.nodered.org/t/raspberry-pi-install-script-not-working/71865/4

Alternative script : --node16

OS details :
pi@raspberry:~ $ cat /etc/os-release

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"

NAME="Debian GNU/Linux"

VERSION_ID="11"

VERSION="11 (bullseye)"

VERSION_CODENAME=bullseye

ID=debian

I am blocked, Please provide a solution.

Regards,
Adil

Welcome to the forum @AdilSultan

When posting terminal output, where possible please copy/paste rather than screenshot, it makes it much easier to read, and the text can be copied. Thanks.

What does this command do? It should output the downloaded script to the terminal, but I suspect it will fail.
curl https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered

Also, I don't think it is the cause of your problem, but have you installed build-essential as it says in the instructions with the bash script? If not then
sudo apt install build-essential

Yes , build-essential alredy done.

sudo apt install build-essential

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

build-essential is already the newest version (12.9).

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

This one also not doing anything :

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

Can you please. Looks like some server side issue

pi@raspberry:~ $ sudo apt install build-essential
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.9).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberry:~ $ bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
pi@raspberry:~ $ curl  https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered
curl: (28) Failed to connect to raw.githubusercontent.com port 443: Connection timed out
pi@raspberry:~ $ ping google.com
PING google.com(bom07s25-in-x0e.1e100.net (2404:6800:4009:815::200e)) 56 data bytes
64 bytes from bom07s25-in-x0e.1e100.net (2404:6800:4009:815::200e): icmp_seq=1 ttl=118 time=50.0 ms
64 bytes from bom07s25-in-x0e.1e100.net (2404:6800:4009:815::200e): icmp_seq=2 ttl=118 time=46.0 ms
64 bytes from bom07s25-in-x0e.1e100.net (2404:6800:4009:815::200e): icmp_seq=3 ttl=118 time=46.5 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 46.009/47.499/49.974/1.762 ms

Do you have curl installed? What does curl -V show?

Can the device access the internet? what does ping 8.8.8.8 show?

Can the device resolve DNS? what does ping www.twitter.com show?

@AdilSultan has already shown that ping google.com is OK.

Can you visit
https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered with a desktop browser?
From the Pi if you have the desktop OS, or else from a PC on your network.

Yes, Able to access this from my PC.

I have created a .sh file and copied these script and ran it manually but i was getting some function not found issue.

pi@raspberry:/tmp $ sh node-red.sh 
node-red.sh: 137: function: not found

And can you ping raw.githubusercontent.com from the Pi?

Do you have a local DNS server such as PiHole?

Well that might be a way to get round the difficulty but it doesn't help diagnose it!

You would have to execute it with bash ./node-red.sh

Interesting to know if you can download the script with wget rather than curl.

wget  https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered
ls -l update-nodejs-and-nodered

I did manual installation of node earlier and now when running with bash and getting this:

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

Node-RED v3.x no longer supports Nodejs 12 
  
  You can force an install of node 14, 16  or 18 by using the --node14, --node16 or --node18 parameter.
  However doing so may break some nodes that may need re-installing manually.
  Generally it is recommended to update all nodes to their latest versions before upgrading.
  
  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.
  Please backup your installation and flows before upgrading.
  
  Exiting now.
pi@raspberry:/tmp $ 

Could you please suggest me with the required command to fix this.

Does bash ./node-red.sh --node16 work?

Yes, Executed with some error but this is working.

Thank you.

Can you see if this works please? It downloads the script but doesn't run it.

Trying to enable service but not working.

pi@raspberry:~ $ sudo systemctl status nodered.service
Unit nodered.service could not be found.
pi@raspberry:~ $ 

If curl cannot access https://raw.githubusercontent then you will be missing a few things, including the start/stop scripts.

We need to find out why curl is not working.

You visited the site from a PC so it's not a network wide / ISP provided DNS problem.

Why are you answering questions and then deleting the answer?

@AdilSultan I just fininshed flashing a new SD card with Bullseye and then ran

sudo apt update 
sudo apt full-upgrade
sudo apt install git
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --node16

and NR is working fine.

One thing I noticed is that when you ran cat /etc/os-release it shows:
NAME="Debian GNU/Linux"
while when I run it I see:
NAME="Raspbian GNU/Linux"
So...

  1. what model Pi are you running
  2. what OS release did you use to do the install?

when I tried to ping raw.githubusercontent.com it shows error 443.
This is the same issue I've been facing since the past week on most of the systems.

Have you done a gooogle search? Try 'network error 443' and see if any of the issues are what is happening to you.

I don't think there is much we can do with the tiny bit of information you supplied. You have not even given the exact text of the error message.

"Most of the systems"
Are you in a commercial / educational setup?
Do you have a network administrator or tech helpdesk whose job it is to solve connectivity problems?