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

**URL:** <https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003>\
**Category:** General\
**Created:** [10 December 2022 19:09 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003 "2022-12-10T19:09:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdilSultan](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@AdilSultan](https://discourse.nodered.org/u/AdilSultan)\
**Post date:** [10 December 2022 19:09 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/1 "2022-12-10T19:09:43Z")

</div>

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

```auto
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](https://discourse.nodered.org/t/raspberry-pi-install-script-not-working/71865/4)

Alternative script : --node16

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/9/b94b29fe3349ab8805c536873883be6df3dd8824.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/d/6de7cd1f38a621e0a90a8afbf139c7c5ca00dd81.png)

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

---

<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:** [10 December 2022 20:26 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/2 "2022-12-10T20:26:55Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![AdilSultan](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@AdilSultan](https://discourse.nodered.org/u/AdilSultan)\
**Post date:** [11 December 2022 10:38 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/3 "2022-12-11T10:38:31Z")

</div>

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](https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

Can you please. Looks like some server side issue

---

<div class="post-metadata">

**Author:** ![AdilSultan](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@AdilSultan](https://discourse.nodered.org/u/AdilSultan)\
**Post date:** [11 December 2022 10:46 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/4 "2022-12-11T10:46:17Z")

</div>

```auto
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

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 December 2022 11:23 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/5 "2022-12-11T11:23:01Z")

</div>

> [@AdilSultan](#):
>
> This one also not doing anything :
> 
> curl [https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered](https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
> 
> Can you please. Looks like some server side issue

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?

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [11 December 2022 11:38 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/6 "2022-12-11T11:38:47Z")

</div>

> [@Steve-Mcl](#):
>
> 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](http://google.com) is OK.

Can you visit  
[https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered](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.

---

<div class="post-metadata">

**Author:** ![AdilSultan](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@AdilSultan](https://discourse.nodered.org/u/AdilSultan)\
**Post date:** [11 December 2022 11:44 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/7 "2022-12-11T11:44:26Z")

</div>

Yes, Able to access this from my PC.

---

<div class="post-metadata">

**Author:** ![AdilSultan](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@AdilSultan](https://discourse.nodered.org/u/AdilSultan)\
**Post date:** [11 December 2022 11:49 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/8 "2022-12-11T11:49:02Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [11 December 2022 11:49 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/9 "2022-12-11T11:49:24Z")

</div>

And can you **ping [raw.githubusercontent.com](http://raw.githubusercontent.com)** from the Pi?

Do you have a local DNS server such as PiHole?

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [11 December 2022 11:51 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/11 "2022-12-11T11:51:16Z")

</div>

> [@AdilSultan](#):
>
> I have created a .sh file and copied these script and ran it manually but i was getting some function not found issue.

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.

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

```

---

<div class="post-metadata">

**Author:** ![AdilSultan](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@AdilSultan](https://discourse.nodered.org/u/AdilSultan)\
**Post date:** [11 December 2022 12:04 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/12 "2022-12-11T12:04:52Z")

</div>

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [11 December 2022 12:06 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/13 "2022-12-11T12:06:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AdilSultan](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@AdilSultan](https://discourse.nodered.org/u/AdilSultan)\
**Post date:** [11 December 2022 12:39 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/15 "2022-12-11T12:39:20Z")

</div>

Yes, Executed with some error but this is working.

Thank you.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [11 December 2022 12:42 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/16 "2022-12-11T12:42:40Z")

</div>

> [@jbudd](#):
>
> Interesting to know if you can download the script with wget rather than curl.
> 
> ```auto
> wget https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered
> ls -l update-nodejs-and-nodered
> 
> ```

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

---

<div class="post-metadata">

**Author:** ![AdilSultan](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@AdilSultan](https://discourse.nodered.org/u/AdilSultan)\
**Post date:** [11 December 2022 12:43 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/17 "2022-12-11T12:43:20Z")

</div>

Trying to enable service but not working.

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

```

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [11 December 2022 12:53 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/19 "2022-12-11T12:53:51Z")

</div>

If curl cannot access [https://raw.githubusercontent](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?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [11 December 2022 13:48 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/20 "2022-12-11T13:48:02Z")

</div>

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

```auto
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?

---

<div class="post-metadata">

**Author:** ![Boreddy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/boreddy/32/72529_2.png) [@Boreddy](https://discourse.nodered.org/u/Boreddy)\
**Post date:** [13 December 2022 13:10 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/21 "2022-12-13T13:10:50Z")

</div>

when I tried to ping [raw.githubusercontent.com](http://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.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [13 December 2022 13:40 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/22 "2022-12-13T13:40:38Z")

</div>

> [@Boreddy](#):
>
> I tried to ping [raw.githubusercontent.com](http://raw.githubusercontent.com) it shows error 443.

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

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [13 December 2022 14:10 UTC](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003/23 "2022-12-13T14:10:18Z")

</div>

> [@Boreddy](#):
>
> This is the same issue I've been facing since the past week on most of the systems.

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?

[Next page](https://discourse.nodered.org/t/bash-command-get-stuck-when-trying-to-install-node-red-in-raspberrypi/72003.md?page=2)
