# Syntax errors when running the install script on raspberry pi

**URL:** <https://discourse.nodered.org/t/syntax-errors-when-running-the-install-script-on-raspberry-pi/94740>\
**Category:** General\
**Created:** [19 January 2025 17:45 UTC](https://discourse.nodered.org/t/syntax-errors-when-running-the-install-script-on-raspberry-pi/94740 "2025-01-19T17:45:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobs409](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bobs409](https://discourse.nodered.org/u/bobs409)\
**Post date:** [19 January 2025 17:45 UTC](https://discourse.nodered.org/t/syntax-errors-when-running-the-install-script-on-raspberry-pi/94740/1 "2025-01-19T17:45:51Z")

</div>

Trying to install Node red on my Raspberry pi 4 but it gives this error:

/dev/fd/63: line 851: syntax error near unexpected token `;;' /dev/fd/63: line 851: ` ;;'

This is the command I'm using:  
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))

Thanks.

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [19 January 2025 18:18 UTC](https://discourse.nodered.org/t/syntax-errors-when-running-the-install-script-on-raspberry-pi/94740/2 "2025-01-19T18:18:02Z")

</div>

Yeah, I guess there is some editing of the script ongoing....

---

<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:** [19 January 2025 18:46 UTC](https://discourse.nodered.org/t/syntax-errors-when-running-the-install-script-on-raspberry-pi/94740/3 "2025-01-19T18:46:47Z")

</div>

> [@bobs409](#):
>
> 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))

A change to the script today by @dceejay (?) commenting out lines 816 to 821 has an error: The `fi` at line 821 should not be commented out; it leaves `if` at line 806 unterminated - at least if the indentation is reliable!:

```auto
    806 if [! -f $file]; then
    807 echo " - You can customise the initial settings by running:"
    808 echo " "
    809 echo " node-red admin init"
    810 echo " "
    811 echo " - After running Node-RED for the first time, change the ownership of the settings"
    812 echo " file to 'root' to prevent unauthorised changes:"
    813 echo " "
    814 echo " sudo chown root:root ~/.node-red/settings.js"
    815 echo " "
    816 # elif ! [[$(stat --format '%G' ~/.node-red/settings.js) = "root"]]; then
    817 # echo " - Change the ownership of its settings file to 'root' to prevent unauthorised changes:"
    818 # echo ""
    819 # echo " sudo chown root:root ~/.node-red/settings.js"
    820 # echo " "
    821 # fi
    822 if ["$EUID" == "0"]; then
    823 echo " - Do not run Node-RED as root or an administraive account"
    824 echo " "
    825 fi
    826 echo " **********************************************************************************"

```

A work-around till it's fixed:  
download the script, edit it and run it locally

```auto
curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered > nrscript
sed -i '821 s/# fi/fi/' nrscript
bash ./nrscript

```

---

<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:** [19 January 2025 19:11 UTC](https://discourse.nodered.org/t/syntax-errors-when-running-the-install-script-on-raspberry-pi/94740/4 "2025-01-19T19:11:52Z")

</div>

SORRY GUYS ! - mea culpa...

pushed fixed script.

---

<div class="post-metadata">

**Author:** ![bobs409](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bobs409](https://discourse.nodered.org/u/bobs409)\
**Post date:** [19 January 2025 20:50 UTC](https://discourse.nodered.org/t/syntax-errors-when-running-the-install-script-on-raspberry-pi/94740/5 "2025-01-19T20:50:14Z")

</div>

Thank you guys. 👍

---

<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:** [2 February 2025 20:50 UTC](https://discourse.nodered.org/t/syntax-errors-when-running-the-install-script-on-raspberry-pi/94740/6 "2025-02-02T20:50:42Z")

</div>

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