Installing on Ubuntu with script

Hello,

I am attempting to install node-red on an ubuntu machine using the provided script, https://nodered.org/docs/getting-started/raspberrypi

However it is exiting at 'Install Node.js LTS' with the error 'Failed to install Node.js'

If I do node -v it shows v8.10.0 installed.

How do I get past this?

Thanks
James

Did you see this in the linked doc?

This script will work on any Debian-based operating system, including Ubuntu and Diet-Pi. You may need to run sudo apt-get install build-essential first to ensure npm is able to build any binary modules it needs to install.

Thanks

Yes, I have run that.

I've just tried again and it says nothing new to install. Main script still fails as before....

what does the end of the install log say ?
(last chunk)

Selecting previously unselected package libhttp-parser2.7.1:amd64.
Preparing to unpack .../libhttp-parser2.7.1_2.7.1-2_amd64.deb ...
Unpacking libhttp-parser2.7.1:amd64 (2.7.1-2) ...
Selecting previously unselected package nodejs.
Preparing to unpack .../nodejs_8.10.0~dfsg-2ubuntu0.4_amd64.deb ...
Unpacking nodejs (8.10.0~dfsg-2ubuntu0.4) ...
Setting up nodejs-doc (8.10.0~dfsg-2ubuntu0.4) ...
Setting up libhttp-parser2.7.1:amd64 (2.7.1-2) ...
Setting up libuv1:amd64 (1.18.0-3) ...
Setting up libc-ares2:amd64 (1.14.0-1) ...
Setting up nodejs (8.10.0~dfsg-2ubuntu0.4) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto $
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
sudo: npm: command not found

hmm - it's picking up the debian node8 for some reason...
so
sudo apt-get purge nodejs npm
then install nodejs manually

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

then re-run the script...
(meanwhile I'll dig into why the script is taking this wrong path too many time s recently...)

I've run those as you suggest but still get the same error when re-running the script...

hmm
what does
which node
return ?

/usr/bin/node

ok - so re-run - sudo apt-get purge nodejs
then which node to check it's been removed.
then - sudo rm /etc/apt/sources.list.d/nodesource.list
to clear out the old nodesource repo (if it was there) then re-run

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

then which node and node -v to see what we have... at that point

Ah... what box / processor are you running on ????

how can I check that?

sorry - try uname -a

Linux DC-5 5.0.0-25-generic #26~18.04.1-Ubuntu SMP Thu Aug 1 13:51:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

ok - so yes - back to my previous thought - do that list...
(It is 64bit - node10 isn't supported on 32bit)

So running your list gives this:

dc@DC-5:~ which node /usr/bin/node dc@DC-5:~ node -v
v8.10.0

errr - which it really can't...
can you copy the output of the
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
command

dc@DC-5:~$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

Installing the NodeSource Node.js 10.x repo...

Populating apt-get cache...

ahhhh - there we go...

try a sudo apt update && sudo apt upgrade manually first and accept the change
then redo the nodejs install
(have to go out for an hour or so - back in a bit) (but we are in google the answer territory now..)

OK. Will do. Have to step away from this myself just now