# Unsuccessful installation of Node Red on Ubuntu 16.04 LTS

**URL:** <https://discourse.nodered.org/t/unsuccessful-installation-of-node-red-on-ubuntu-16-04-lts/7245>\
**Category:** General\
**Created:** [25 January 2019 13:37 UTC](https://discourse.nodered.org/t/unsuccessful-installation-of-node-red-on-ubuntu-16-04-lts/7245 "2019-01-25T13:37:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhmluna](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jhmluna/32/5395_2.png) [@jhmluna](https://discourse.nodered.org/u/jhmluna)\
**Post date:** [25 January 2019 13:37 UTC](https://discourse.nodered.org/t/unsuccessful-installation-of-node-red-on-ubuntu-16-04-lts/7245/1 "2019-01-25T13:37:31Z")

</div>

I'm trying to install Node Red in a desktop with Ubuntu 16.04 LTS operating system.  
Already successfully installed Node.js (v4.2.6) and npm (v3.5.2).  
But when I try to install Node Red using the command `sudo npm install -g --unsafe-perm node-red`, the things start to not working.

Can someone help me?  
The error is as follows:

> jhluna@nodered:~$ sudo npm install -g --unsafe-perm node-red  
> loadDep:bcrypt → resolveW  
> loadDep:punycode → networ  
> loadDep:readable-stream →  
> npm WARN deprecated nodemailer@1.11.0: All versions below 4.0.1 of Nodemailer are deprecated. See [Status :: Nodemailer](https://nodemailer.com/status/)  
> npm WARN deprecated mailparser@0.6.2: Mailparser versions older than v2.3.0 are deprecated  
> npm WARN deprecated mimelib@0.3.1: This project is unmaintained  
> npm WARN deprecated mailcomposer@2.1.0: This project is unmaintained  
> npm WARN deprecated buildmail@2.0.0: This project is unmaintained  
> loadDep:uuid → resolveWit  
> /usr/local/bin/node-red -\> /usr/local/lib/node\_modules/node-red/red.js  
> /usr/local/bin/node-red-pi -\> /usr/local/lib/node\_modules/node-red/bin/node-red-pi
> 
> bcrypt@2.0.1 install /usr/local/lib/node\_modules/node-red/node\_modules/bcrypt  
> node-pre-gyp install --fallback-to-build
> 
> node-pre-gyp ERR! UNCAUGHT EXCEPTION  
> node-pre-gyp ERR! stack TypeError: this is not a typed array.  
> node-pre-gyp ERR! stack at Function.from (native)  
> node-pre-gyp ERR! stack at Object. (/usr/local/lib/node\_modules/node-red/node\_modules/bcrypt/node\_modules/tar/lib/parse.js:33:27)  
> node-pre-gyp ERR! stack at Module.\_compile (module.js:410:26)  
> node-pre-gyp ERR! stack at Object.Module.\_extensions..js (module.js:417:10)  
> node-pre-gyp ERR! stack at Module.load (module.js:344:32)  
> node-pre-gyp ERR! stack at Function.Module.\_load (module.js:301:12)  
> node-pre-gyp ERR! stack at Module.require (module.js:354:17)  
> node-pre-gyp ERR! stack at require (internal/module.js:12:17)  
> node-pre-gyp ERR! stack at Object. (/usr/local/lib/node\_modules/node-red/node\_modules/bcrypt/node\_modules/tar/lib/list.js:10:16)  
> node-pre-gyp ERR! stack at Module.\_compile (module.js:410:26)  
> node-pre-gyp ERR! System Linux 4.15.0-43-generic  
> node-pre-gyp ERR! command "/usr/bin/nodejs" "/usr/local/lib/node\_modules/node-red/node\_modules/bcrypt/node\_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"  
> node-pre-gyp ERR! cwd /usr/local/lib/node\_modules/node-red/node\_modules/bcrypt  
> node-pre-gyp ERR! node -v v4.2.6  
> node-pre-gyp ERR! node-pre-gyp -v v0.9.1  
> node-pre-gyp ERR! This is a bug in `node-pre-gyp`.  
> node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:  
> node-pre-gyp ERR! [https://github.com/mapbox/node-pre-gyp/issues](https://github.com/mapbox/node-pre-gyp/issues)  
> npm WARN install:bcrypt@2.0.1 bcrypt@2.0.1 install: `node-pre-gyp install --fallback-to-build`  
> npm WARN install:bcrypt@2.0.1 Exit status 7  
> /usr/local/lib  
> └── node-red@0.19.5

---

<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:** [25 January 2019 13:43 UTC](https://discourse.nodered.org/t/unsuccessful-installation-of-node-red-on-ubuntu-16-04-lts/7245/2 "2019-01-25T13:43:56Z")

</div>

Hi,

> [@jhmluna](#):
>
> Node.js (v4.2.6)

You need a more recent version of Node. We recommend Node 8.x.

---

<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 January 2019 14:21 UTC](https://discourse.nodered.org/t/unsuccessful-installation-of-node-red-on-ubuntu-16-04-lts/7245/3 "2019-01-25T14:21:20Z")

</div>

In fact the easiest way is to use the Pi install script in the installation docs. It works fine on Ubuntu.

---

<div class="post-metadata">

**Author:** ![jhmluna](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jhmluna/32/5395_2.png) [@jhmluna](https://discourse.nodered.org/u/jhmluna)\
**Post date:** [25 January 2019 16:04 UTC](https://discourse.nodered.org/t/unsuccessful-installation-of-node-red-on-ubuntu-16-04-lts/7245/4 "2019-01-25T16:04:48Z")

</div>

Thank you both.  
I have performed the following procedures to be able to update Node.js to version 8.x:

`sudo apt install curl`

`curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -`

`sudo apt-get install -y nodejs`

After that, the Node.js and npm was updated, respectively, to v8.15.0 and 6.4.1 and I could install the Node Red using Pi install script as @Colin sad. The script was:

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

```

The sources were:

[https://nodered.org/docs/hardware/raspberrypi](https://nodered.org/docs/hardware/raspberrypi)

> **[Install the Latest Node.js and NPM Packages on Ubuntu 16.04 / 18.04 LTS |...](https://websiteforstudents.com/install-the-latest-node-js-and-nmp-packages-on-ubuntu-16-04-18-04-lts/)**
>
> Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine….. Chrome V8 engine is a Google’s open source high-performance JavaScript engine written in C++ and used in Google Chrome…

---

<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 January 2019 16:26 UTC](https://discourse.nodered.org/t/unsuccessful-installation-of-node-red-on-ubuntu-16-04-lts/7245/5 "2019-01-25T16:26:38Z")

</div>

Too late now, but just for reference, the Pi script would have upgraded node.js for you (using the same technique you did).
