# Bash script can't find the path

**URL:** <https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533>\
**Category:** General\
**Created:** [12 May 2021 09:01 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533 "2021-05-12T09:01:21Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cracatus](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@Cracatus](https://discourse.nodered.org/u/Cracatus)\
**Post date:** [12 May 2021 09:01 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/1 "2021-05-12T09:01:21Z")

</div>

Hi,

I'm brand new to nodered. When I saw the possibilities, I tried to install on my RPI4 by following the following tutorial: [nodered.org \> docs \> getting-started \> raspberrypi](https://nodered.org/docs/getting-started/raspberrypi)

When I get to the bash command, the RPI gives me the following error:

```auto
bash: /dev/fd/63: No such file or directory

```

A quick search on your forum indicates that the error has already been spotted but I did not know how to resolve it.

However, I can give you the following information about my installation.  
1- I installed Git with the command "sudo apt install build-essential git"  
2- Cat /etc/os-release :

```auto
PRETTY NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RasbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

```

Thank you for your help and attention.

---

<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:** [12 May 2021 09:21 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/2 "2021-05-12T09:21:59Z")

</div>

> [@Cracatus](#):
>
> When I get to the bash command, the RPI gives me the following error:

Welcome to the forum @Cracatus

Can you copy/paste the terminal output showing the command you are entering and the error please? Copy/paste rather than a screenshot please, if possible.

---

<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:** [12 May 2021 09:24 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/3 "2021-05-12T09:24:46Z")

</div>

Also what do these commands show  
`node -v`  
`which node`  
`apt policy nodejs`

---

<div class="post-metadata">

**Author:** ![Cracatus](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@Cracatus](https://discourse.nodered.org/u/Cracatus)\
**Post date:** [12 May 2021 09:38 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/4 "2021-05-12T09:38:50Z")

</div>

Okay,  
The commands give:

```auto
node -v
-bash: node: commande not found

which node
-bash: node: commande not found

apt policy nodejs
nodejs:
   Installed: (none)
   Candidate: 10.24.0~dfsg-1~deb10u1
   Version table:
      10.24.0~dfsg-1~deb10u1 500
         500 http://respbian.raspberrypi.org/raspbian buster/main armf Packages

```

It therefore seems not installed by default correctly at the "node" level. But since I am starting from a very fresh isntalattion it is possible that something needs to be done.

Thank you

---

<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:** [12 May 2021 09:45 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/5 "2021-05-12T09:45:01Z")

</div>

Before you run the script nodejs should not be installed, so that is ok.

Show us the output you are getting please. You haven't made it clear where that error is appearing.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [12 May 2021 09:46 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/6 "2021-05-12T09:46:02Z")

</div>

and presumably the `curl` command is also installed ?

---

<div class="post-metadata">

**Author:** ![Cracatus](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@Cracatus](https://discourse.nodered.org/u/Cracatus)\
**Post date:** [12 May 2021 10:05 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/7 "2021-05-12T10:05:58Z")

</div>

the error appears just after sending the bash command.

---

<div class="post-metadata">

**Author:** ![Cracatus](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@Cracatus](https://discourse.nodered.org/u/Cracatus)\
**Post date:** [12 May 2021 10:07 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/8 "2021-05-12T10:07:08Z")

</div>

i can try a:

```auto
sudo apt-get install curl

```

I would like to be sure of the correct order.

---

<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:** [12 May 2021 10:18 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/9 "2021-05-12T10:18:47Z")

</div>

Yes, do that, the script needs it already installed.

Then if it still doesn't work please copy/paste the command you are entering and the result. As I asked earlier.

---

<div class="post-metadata">

**Author:** ![Cracatus](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@Cracatus](https://discourse.nodered.org/u/Cracatus)\
**Post date:** [12 May 2021 10:51 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/10 "2021-05-12T10:51:41Z")

</div>

It's pretty straightforward.  
When I try to install curl I get this:

````auto
Reading package lists... Done
Building dependency tree
Reading state information... Done
curl is already the newest version (7.64.0-4+deb10u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. ```
28 / 5000
Résultats de traduction
In order I do this: 

````

pi@raspberrypi:~ $ sudo apt-get update && sudo apt-get upgrade  
pi@raspberrypi:~ $ sudo reboot  
pi@raspberrypi:~ $ sudo apt-get install vim  
pi@raspberrypi:~ $ sudo apt-get install build-essential git  
pi@raspberrypi:~ $ sudo bash \<(curl -sL [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))

```auto
Am I wrong ?
```

---

<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:** [12 May 2021 10:54 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/11 "2021-05-12T10:54:24Z")

</div>

Don’t use `sudo` When running the bash

---

<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:** [12 May 2021 10:57 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/12 "2021-05-12T10:57:40Z")

</div>

And show us the command and the result, not just the command.

---

<div class="post-metadata">

**Author:** ![Cracatus](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@Cracatus](https://discourse.nodered.org/u/Cracatus)\
**Post date:** [12 May 2021 11:08 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/13 "2021-05-12T11:08:39Z")

</div>

OMG, it works without the sudo ... Me using my commands. Good visibvlement must be done in order ... and transfer the sudo for the bash command

This is what is happening:

```auto

pi@raspberrypi:~ $ sudo apt-get update && sudo apt-get upgrade
pi@raspberrypi:~ $ sudo reboot
pi@raspberrypi:~ $ sudo apt-get install vim
pi@raspberrypi:~ $ sudo apt-get install build-essential git
pi@raspberrypi:~ $ sudo apt-get install curl
pi@raspberrypi:~ $ bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
Running Node-RED install for user pi at /home/pi on raspbian

This can take 20-30 minutes on the slower Pi versions - please wait.

  Stop Node-RED ✔
  Remove old version of Node-RED ✔
  Remove old version of Node.js ✔
  Install Node.js LTS ✔ Node v12.22.1 Npm 6.14.12
  Clean npm cache ✔
  Install Node-RED core ✔ 1.3.4
  Move global nodes to local -
  Install extra Pi nodes ✔
  Npm rebuild existing nodes ✔
  Add shortcut commands ✔
  Update systemd script ✔

Any errors will be logged to /var/log/nodered-install.log
All done.
  You can now start Node-RED with the command node-red-start
  or using the icon under Menu / Programming / Node-RED
  Then point your browser to localhost:1880 or http://{your_pi_ip-address}:1880

Started Wed 12 May 13:04:10 CEST 2021 - Finished Wed 12 May 13:06:30 CEST 2021

pi@raspberrypi:~ $ 

```

I test again to be sure of the procedure.

---

<div class="post-metadata">

**Author:** ![Cracatus](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@Cracatus](https://discourse.nodered.org/u/Cracatus)\
**Post date:** [12 May 2021 11:45 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/14 "2021-05-12T11:45:47Z")

</div>

Well, I'm happy! It works perfectly. The error was with sudo, which should not be used with bash.

I have another question but it is far removed from this one. I therefore close the subject.

Thank you so much for your help.  
Sincerely,  
Alex

---

<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:** [12 May 2021 12:39 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/15 "2021-05-12T12:39:47Z")

</div>

You only need to install the packages (build-esssential, curl etc) once, once you have installed them they are installed.

Why are you installing vim? Perhaps you need it for some other reason, but node-red does not need it.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 May 2021 12:40 UTC](https://discourse.nodered.org/t/bash-script-cant-find-the-path/45533/16 "2021-05-26T12:40:12Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
