# Cannot run install script

**URL:** <https://discourse.nodered.org/t/cannot-run-install-script/30688>\
**Category:** General\
**Created:** [25 July 2020 11:18 UTC](https://discourse.nodered.org/t/cannot-run-install-script/30688 "2020-07-25T11:18:01Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrohner](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@mrohner](https://discourse.nodered.org/u/mrohner)\
**Post date:** [25 July 2020 11:18 UTC](https://discourse.nodered.org/t/cannot-run-install-script/30688/1 "2020-07-25T11:18:01Z")

</div>

I try to use suggested install script:  
`bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)`

The commend returned:  
-sh: 8: Syntax error: "(" unexpected

This is on a Debian Linux. Any ideas?

---

<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:** [25 July 2020 12:30 UTC](https://discourse.nodered.org/t/cannot-run-install-script/30688/2 "2020-07-25T12:30:28Z")

</div>

1 - what platform?  
2 - what version of Debian?  
3 - What user is running the command?  
4 - does the user have SUDO ability?  
5 - is anything else showing up when you run the script?  
6 - Does it die right away or does it do some things first?

---

<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:** [25 July 2020 12:32 UTC](https://discourse.nodered.org/t/cannot-run-install-script/30688/3 "2020-07-25T12:32:51Z")

</div>

Also, if it does appear to get started then post the contents of `/var/log/nodered-install.log`

**[Edit]** Another thought, is bash installed? It is available by default on most systems but maybe not yours.

---

<div class="post-metadata">

**Author:** ![harelabb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/harelabb/32/27450_2.png) [@harelabb](https://discourse.nodered.org/u/harelabb)\
**Post date:** [25 July 2020 22:51 UTC](https://discourse.nodered.org/t/cannot-run-install-script/30688/4 "2020-07-25T22:51:31Z")

</div>

If bash is not your current shell, try starting a bash shell and run the command from there.  
It looks as the error message comes from sh, not from 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:** [26 July 2020 07:41 UTC](https://discourse.nodered.org/t/cannot-run-install-script/30688/5 "2020-07-26T07:41:38Z")

</div>

> [@harelabb](#):
>
> If bash is not your current shell, try starting a bash shell and run the command from there.

I don't think that should make any difference as the command explicitly invokes bash. As you say, the error suggests that it is from sh, which is why I wondered whether bash is not available. Until we hear from @mrohner we won't know.

---

<div class="post-metadata">

**Author:** ![harelabb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/harelabb/32/27450_2.png) [@harelabb](https://discourse.nodered.org/u/harelabb)\
**Post date:** [26 July 2020 12:03 UTC](https://discourse.nodered.org/t/cannot-run-install-script/30688/6 "2020-07-26T12:03:41Z")

</div>

> @Colin  
> the command explicitly invokes bash...

It is the current shell that interprets the "\<" and parenthesis , not necessarily bash. Been there, as I use tcsh.

---

<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:** [26 July 2020 12:40 UTC](https://discourse.nodered.org/t/cannot-run-install-script/30688/7 "2020-07-26T12:40:59Z")

</div>

> [@harelabb](#):
>
> It is the current shell that interprets the "\<" and parenthesis

Oh yes, you are right, the script will not run when invoked from `sh` so your advice to run bash first and then the script is correct.  
Something new to learn every day, thanks.

---

<div class="post-metadata">

**Author:** ![mrohner](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@mrohner](https://discourse.nodered.org/u/mrohner)\
**Post date:** [27 July 2020 08:00 UTC](https://discourse.nodered.org/t/cannot-run-install-script/30688/8 "2020-07-27T08:00:16Z")

</div>

with "sudo -i" I let run the command as root (although not recommendet) and it worked. Thanks for all your replies

---

<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:** [27 July 2020 08:33 UTC](https://discourse.nodered.org/t/cannot-run-install-script/30688/9 "2020-07-27T08:33:30Z")

</div>

No, definitely not recommended. Whether it worked or not depends on your definition of worked. Running node-red as root has risks.  
Did you try the suggestions above?

---

<div class="post-metadata">

**Author:** ![mrohner](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@mrohner](https://discourse.nodered.org/u/mrohner)\
**Post date:** [28 July 2020 13:14 UTC](https://discourse.nodered.org/t/cannot-run-install-script/30688/10 "2020-07-28T13:14:09Z")

</div>

OK, did install an Ubuntu 20.04 from scratch, with all the updates a newer bash was installed. Your script now works flawlessly under a regular user with sudo capability.  
Thanks for your tips,

---

<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:** [11 August 2020 13:14 UTC](https://discourse.nodered.org/t/cannot-run-install-script/30688/11 "2020-08-11T13:14:10Z")

</div>

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