# Installing Node-Red on Linux

**URL:** https://discourse.nodered.org/t/installing-node-red-on-linux/54957
**Category:** General
**Created:** [9 December 2021 19:26 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957 "2021-12-09T19:26:20Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![binyameenaslam342](https://avatars.discourse-cdn.com/v4/letter/b/8e8cbc/32.png) [@binyameenaslam342](https://discourse.nodered.org/u/binyameenaslam342)
#### Post date: [9 December 2021 19:26 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957/1 "2021-12-09T19:26:20Z")

</div>

I am also facing a similar Nodejs issue on ubuntu. Here is the error.

```auto
Running Node-RED install for user dem at /home/dem on ubuntu

Nodejs 10 is no longer supported.
  You can update to the latest Node-RED 1.x version by adding --nodered-version="1.3.5"
  to that install command. If in doubt this is the safer option.
  
  Or you can force an install of node 12 or 14 by using the --node12, --node14 or --node16 parameter
  However doing so may break some nodes that may need re-installing manually.
  Generally it is recommended to upgrade all nodes to their latest versions before upgrading.
  
  Please backup your installation and flows before upgrading.
  
  Note: not all embedded hardware can be updated via this method - please check before proceeding.
  
  Exiting now.

```

When I try to update to the latest version of node-red by running command `--nodered-version="1.3.5"` I get this error.

```auto
--nodered-version=1.3.5: command not found

```

---

<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: [9 December 2021 19:30 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957/2 "2021-12-09T19:30:12Z")

</div>

You add ` --node14` to the end of the full script command

---

<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: [9 December 2021 19:40 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957/3 "2021-12-09T19:40:28Z")

</div>

The message  
"You can update to the latest Node-RED 1.x version by adding --nodered-version="1.3.5"  
to that install command." is misleading because the latest version of node-red is 2.1.4.  
To install that, use the script and as Steve suggests add --node14 after the closing bracket. Don't specify a node-red version.

Edit darn but this is hard to get right on a phone!

---

<div class="post-metadata">

### Author: ![binyameenaslam342](https://avatars.discourse-cdn.com/v4/letter/b/8e8cbc/32.png) [@binyameenaslam342](https://discourse.nodered.org/u/binyameenaslam342)
#### Post date: [10 December 2021 11:19 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957/4 "2021-12-10T11:19:33Z")

</div>

Error is "Command Not found"

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [10 December 2021 11:21 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957/5 "2021-12-10T11:21:21Z")

</div>

What command are you running to get 'Command 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: [10 December 2021 11:35 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957/6 "2021-12-10T11:35:00Z")

</div>

The installation command is

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

```

You can copy and paste it from the documentation getting started page, add --node14 to the end

---

<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 2021 11:48 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957/7 "2021-12-10T11:48:03Z")

</div>

I suspect the command run was `--nodered-version="1.3.5"` which has come up before, even though that is not what the instructions say. I think the text could be improved, it does not make it clear that 1.x is not the latest version of node red. Perhaps the words could be improved by saying something like

Nodejs 10 is not supported by node-RED V2.x  
Then put the bit about installing 12 or 14, then  
If you do not wish to update nodejs you can update to the last version of Node-RED 1.x by adding --nodered-version="1.3.5" to the bash command.

---

<div class="post-metadata">

### Author: ![binyameenaslam342](https://avatars.discourse-cdn.com/v4/letter/b/8e8cbc/32.png) [@binyameenaslam342](https://discourse.nodered.org/u/binyameenaslam342)
#### Post date: [13 December 2021 07:16 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957/8 "2021-12-13T07:16:57Z")

</div>

This command returns error "Bad install"  
`bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --node14`

however using  
`bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --node16` worked perfectly except "node-red core" was not installed.

---

<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: [13 December 2021 07:48 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957/9 "2021-12-13T07:48:38Z")

</div>

Please post the install log here, or put it on a sharing site if it is too big to post.

What do you mean by node-red core?

---

<div class="post-metadata">

### Author: ![binyameenaslam342](https://avatars.discourse-cdn.com/v4/letter/b/8e8cbc/32.png) [@binyameenaslam342](https://discourse.nodered.org/u/binyameenaslam342)
#### Post date: [13 December 2021 10:04 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957/10 "2021-12-13T10:04:40Z")

</div>

![Screenshot from 2021-12-13 14-55-45](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/8/989b19a7519ee53645a82e47a4a7de53e0efff34.png)  
Sixth step "Install Node-Red Core" there was red cross mark in front of it instead of green tick mark.

---

<div class="post-metadata">

### Author: ![binyameenaslam342](https://avatars.discourse-cdn.com/v4/letter/b/8e8cbc/32.png) [@binyameenaslam342](https://discourse.nodered.org/u/binyameenaslam342)
#### Post date: [13 December 2021 10:05 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957/11 "2021-12-13T10:05:35Z")

</div>

Here is the log file link

> **[nodered-install.log](https://drive.google.com/file/d/13OryF4HnIo_4VdQObhZ0UTsSJUysHUUm/view?usp=sharing)**
>
> Google Drive file.

---

<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: [13 December 2021 10:32 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957/12 "2021-12-13T10:32:25Z")

</div>

Run  
`sudo apt update && sudo apt full-upgrade`  
And make sure that it updates ok without error. Once you have that working then try the script again.

---

<div class="post-metadata">

### Author: ![binyameenaslam342](https://avatars.discourse-cdn.com/v4/letter/b/8e8cbc/32.png) [@binyameenaslam342](https://discourse.nodered.org/u/binyameenaslam342)
#### Post date: [21 December 2021 06:37 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957/13 "2021-12-21T06:37:15Z")

</div>

```auto
E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1340 (packagekitd)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to lock directory /var/lib/apt/lists/

```

---

<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: [21 December 2021 13:48 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957/14 "2021-12-21T13:48:13Z")

</div>

Is the problem still there if you try again? It could be caused by you trying to do it at the same time as something else was trying to use apt in the background.

If it still happens then reboot and wait a while then try again.

If it still happens then run  
`ps -aux | grep nnnn`  
where nnnn is the process id referenced in the error.

---

<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: [19 February 2022 13:48 UTC](https://discourse.nodered.org/t/installing-node-red-on-linux/54957/15 "2022-02-19T13:48:47Z")

</div>

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