# Unable to install on Debian with Raspberry Pi Desktop

**URL:** <https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354>\
**Category:** General\
**Created:** [23 April 2020 08:59 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354 "2020-04-23T08:59:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![magtimmermans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/magtimmermans/32/20478_2.png) [@magtimmermans](https://discourse.nodered.org/u/magtimmermans)\
**Post date:** [23 April 2020 08:59 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/1 "2020-04-23T08:59:19Z")

</div>

Hi,

I am running **Debian with Raspberry Pi Desktop** which works fine but I cannot install node-red using the official script.

It gave the error:  
Update Node.js LTS ✘ Failed to install Node.js - Exit

This are the last few lines from the log file, which is not helpful (in my opinion 🙂 just a beginner)

Reading state information...  
Suggested packages:  
npm  
The following NEW packages will be installed:  
nodejs  
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.  
Need to get 0 B/86.3 kB of archives.  
After this operation, 160 kB of additional disk space will be used.  
Selecting previously unselected package nodejs.  
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database $  
Preparing to unpack .../nodejs\_10.15.2~dfsg-2\_i386.deb ...  
Unpacking nodejs (10.15.2~dfsg-2) ...  
Setting up nodejs (10.15.2~dfsg-2) ...  
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode  
Processing triggers for man-db (2.8.5-2) ...

What do I wrong, The Raspberry desktop is a clean install on VmWare.

---

<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:** [23 April 2020 09:12 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/2 "2020-04-23T09:12:35Z")

</div>

The script is meant for running on a real Pi or 64bit architecture - there is no longer a decent build for nodejs on 32 bit x86 architecture - so you will need to install nodejs by hand first (to not use the built in deb package), and then use the script to add Node-RED . Or use an Ubuntu VM

---

<div class="post-metadata">

**Author:** ![magtimmermans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/magtimmermans/32/20478_2.png) [@magtimmermans](https://discourse.nodered.org/u/magtimmermans)\
**Post date:** [23 April 2020 09:29 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/3 "2020-04-23T09:29:34Z")

</div>

@dceejay, thanks for responding. Is the Raspberry PI Desktop not 64 bit?

Could you help me a bit with installing this as my Linux experience is very low ☹ Just learning...)

Thanks

---

<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:** [23 April 2020 09:56 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/4 "2020-04-23T09:56:43Z")

</div>

The suggestion is that your computer is 32 bit.

---

<div class="post-metadata">

**Author:** ![magtimmermans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/magtimmermans/32/20478_2.png) [@magtimmermans](https://discourse.nodered.org/u/magtimmermans)\
**Post date:** [23 April 2020 09:57 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/5 "2020-04-23T09:57:03Z")

</div>

It isn't it is 64 bit.

---

<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:** [23 April 2020 10:02 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/6 "2020-04-23T10:02:45Z")

</div>

Have you installed a 32 bit version of Debian then?

---

<div class="post-metadata">

**Author:** ![magtimmermans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/magtimmermans/32/20478_2.png) [@magtimmermans](https://discourse.nodered.org/u/magtimmermans)\
**Post date:** [23 April 2020 10:03 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/7 "2020-04-23T10:03:50Z")

</div>

@Colin, I have installed this one: [https://www.raspberrypi.org/downloads/raspberry-pi-desktop/](https://www.raspberrypi.org/downloads/raspberry-pi-desktop/)

---

<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:** [23 April 2020 10:08 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/8 "2020-04-23T10:08:36Z")

</div>

Oh, you said you had installed the desktop on Debian, what you mean is that you have installed Raspbian Buster.  
What does this command show?  
`apt policy nodejs`

---

<div class="post-metadata">

**Author:** ![magtimmermans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/magtimmermans/32/20478_2.png) [@magtimmermans](https://discourse.nodered.org/u/magtimmermans)\
**Post date:** [23 April 2020 11:34 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/9 "2020-04-23T11:34:07Z")

</div>

> [@Colin](#):
>
> apt policy nodejs

```auto
nodejs:
  Installed: 10.15.2~dfsg-2
  Candidate: 10.15.2~dfsg-2
  Version table:
 *** 10.15.2~dfsg-2 500
        500 http://ftp.debian.org/debian buster/main i386 Packages
        100 /var/lib/dpkg/status

```

---

<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:** [23 April 2020 12:33 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/10 "2020-04-23T12:33:56Z")

</div>

What do these commands show?  
`node -v`  
`npm -v`  
If either of those shows an error then can you post the full install log please?

---

<div class="post-metadata">

**Author:** ![magtimmermans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/magtimmermans/32/20478_2.png) [@magtimmermans](https://discourse.nodered.org/u/magtimmermans)\
**Post date:** [23 April 2020 12:41 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/11 "2020-04-23T12:41:13Z")

</div>

@Colin

```auto
pi@raspberry:~ $ node -v
v10.15.2
pi@raspberry:~ $ npm -v
bash: npm: command not found
pi@raspberry:~ $ 

```

---

<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:** [23 April 2020 12:42 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/12 "2020-04-23T12:42:11Z")

</div>

> [@Colin](#):
>
> If either of those shows an error then can you post the full install log please?

As I asked please

---

<div class="post-metadata">

**Author:** ![magtimmermans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/magtimmermans/32/20478_2.png) [@magtimmermans](https://discourse.nodered.org/u/magtimmermans)\
**Post date:** [23 April 2020 13:15 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/13 "2020-04-23T13:15:04Z")

</div>

@Colin, Aha sorry, I misunderstood you.

Sorry for the long text, but new users are not able to load attachments ☹

```auto
***************************************

Started : Thu 23 Apr 2020 10:56:59 AM CEST
Running for user pi at /home/pi
Failed to stop nodered.service: Unit nodered.service not loaded.
Found global nodes: :

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package nodered
Already have nodejs v10.15.2
Now install nodejs
Updating nodejs v10.15.2
Using nodesource.list
Removing nodejs v10

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package 'nodejs-legacy' is not installed, so not removed
Package 'npm' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  libc-ares2 libnode64 libuv1 nodejs-doc
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  nodejs
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 160 kB disk space will be freed.
(Reading database ... 143192 files and directories currently installed.)
Removing nodejs (10.15.2~dfsg-2) ...
Processing triggers for man-db (2.8.5-2) ...

## Installing the NodeSource Node.js 12.x repo...

## Populating apt-get cache...

+ apt-get update
Hit:1 http://ftp.debian.org/debian buster InRelease
Hit:2 http://ftp.debian.org/debian buster-updates InRelease
Hit:3 http://archive.raspberrypi.org/debian buster InRelease
Hit:4 https://deb.nodesource.com/node_12.x buster InRelease
Hit:5 http://security.debian.org buster/updates InRelease
Reading package lists...

## Confirming "buster" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_12.x/dists/buster/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK

## Creating apt sources list file for the NodeSource Node.js 12.x repo...

+ echo 'deb https://deb.nodesource.com/node_12.x buster main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src https://deb.nodesource.com/node_12.x buster main' >> /etc/apt/sources.list.d/nodesource.list

## Running `apt-get update` for you...

+ apt-get update
Hit:1 http://security.debian.org buster/updates InRelease
Hit:2 http://ftp.debian.org/debian buster InRelease
Hit:3 http://archive.raspberrypi.org/debian buster InRelease
Hit:4 http://ftp.debian.org/debian buster-updates InRelease
Hit:5 https://deb.nodesource.com/node_12.x buster InRelease
Reading package lists...

## Run `sudo apt-get install -y nodejs` to install Node.js 12.x and npm
## You may also need development tools to build native addons:
     sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
     echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
     sudo apt-get update && sudo apt-get install yarn

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
  npm
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/86.3 kB of archives.
After this operation, 160 kB of additional disk space will be used.
Selecting previously unselected package nodejs.
(Reading database ... 143181 files and directories currently installed.)
Preparing to unpack .../nodejs_10.15.2~dfsg-2_i386.deb ...
Unpacking nodejs (10.15.2~dfsg-2) ...
Setting up nodejs (10.15.2~dfsg-2) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for man-db (2.8.5-2) ...

```

---

<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:** [23 April 2020 14:50 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/14 "2020-04-23T14:50:06Z")

</div>

I much prefer a paste inline to having to open a link.  
Very odd, it isn't installing nodejs 12 for some reason. What do these show?

```auto
cat /etc/apt/sources.list.d/nodesource.list
sudo apt update
apt policy nodejs

```

I think it might be something to do with the VM you are installing into, but I don't know enough about VMs to suggest what.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [23 April 2020 14:53 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/15 "2020-04-23T14:53:41Z")

</div>

Not much help but I had an old stretch version of RPi for Desktop in VirtualBox vm so I gave the script a go on that and it failed on me as well - different error messages (stuff about nvm) but fail just the same

Maybe just use an 64bit Ubunutu VM like what @dceejay recommended if you want to try out NR on a VM?

---

<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:** [23 April 2020 14:59 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/16 "2020-04-23T14:59:36Z")

</div>

Looking back I see that the nodejs install script has setup the repository  
`http://ftp.debian.org/debian buster/main i386 Packages`  
which is a 32 bit repository as was pointed out earlier. I think the nodejs install script (which is not provided by node red) is not handling Raspbian on a Debian VM correctly.

---

<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:** [23 April 2020 21:00 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/17 "2020-04-23T21:00:27Z")

</div>

To clarify - Raspbian is still a 32 bit operating system - whether for arm or intel processor. (As Pi doesn't yet go above 4GB there is no need for 64 bit.. 🙂 So if you create a vm on a 64bit machine the vm will still be 32bit. No doubt that will change at some point - but that is not where we are.

You could try an unofficial build from here - [https://unofficial-builds.nodejs.org/download/release/v12.16.2/](https://unofficial-builds.nodejs.org/download/release/v12.16.2/)  
or go way back to node8 official build - [https://nodejs.org/dist/latest-carbon/node-v8.17.0-linux-x86.tar.gz](https://nodejs.org/dist/latest-carbon/node-v8.17.0-linux-x86.tar.gz)

As I said it's probably cleaner to go for an ubuntu vm on intel instead. Or there is another Debian based distro called Zoriin which has quite a nice UI.

---

<div class="post-metadata">

**Author:** ![magtimmermans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/magtimmermans/32/20478_2.png) [@magtimmermans](https://discourse.nodered.org/u/magtimmermans)\
**Post date:** [24 April 2020 07:24 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/18 "2020-04-24T07:24:52Z")

</div>

Hi Guys,  
I am pretty sure it is 64 bit. But I think indeed the script does not detect this very well.

```auto
pi@raspberry:~ $ uname -m
x86_64

```

I will try zoriin see if that is helping 🙂

---

<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:** [24 April 2020 08:08 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/19 "2020-04-24T08:08:39Z")

</div>

A solution is not to use the install script, but to install the individual components by hand. I think this is detailed in the getting started guide. It is not particularly difficult.

---

<div class="post-metadata">

**Author:** ![magtimmermans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/magtimmermans/32/20478_2.png) [@magtimmermans](https://discourse.nodered.org/u/magtimmermans)\
**Post date:** [24 April 2020 09:59 UTC](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354/20 "2020-04-24T09:59:45Z")

</div>

Hi @Colin, ok I will check this as well. Thanks!

[Next page](https://discourse.nodered.org/t/unable-to-install-on-debian-with-raspberry-pi-desktop/25354.md?page=2)
