Problems installing Node-RED npm missing Ubuntu 20.04 (Solved)

Hi,

I am trying to install Node-RED using the script on my Dell M6700 Lapto running Ubuntu 20.04, however, this is proving to be a challenge.

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

I have looked through past threads, but I have not been able to resolve the issue.

From the log /var/log/nodered-install.log, the final two lines are:

sudo: npm: command not found
Versions: node:v10.19.0 npm:

I have installed npm and node.js manually, but this doesn't seem to make any difference.

node -v v10.19.0
whereis node
node: /usr/bin/node /usr/share/man/man1/node.1.gz

npm -v 6.14.4
whereis npm
npm: /usr/bin/npm /usr/share/npm /usr/share/man/man1/npm.1.gz

After running the script I get...

node -v  v10.19.0
whereis node
node: /usr/bin/node /usr/share/man/man1/node.1.gz

npm -v
bash: /usr/bin/npm: No such file or directory
whereis npm
npm:

Looking at the log, I see this...

## Confirming "focal" is supported...

	+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_12.x/dists/focal/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)
	gpg: invalid key resource URL '/etc/apt/trusted.gpg.d/graphics:darktable.gpg'
	gpg: keyblock resource '(null)': General error
	gpg: key 040524A84C70D8B5: 1 signature not checked due to a missing key
	gpg: key 3B4FE6ACC0B21F32: 3 signatures not checked due to missing keys
	gpg: key D94AA3F0EFE21092: 3 signatures not checked due to missing keys
	gpg: key 871920D1991BC93C: 1 signature not checked due to a missing key
	gpg: Total number processed: 7
	gpg:       skipped new keys: 7
	Error executing command, exiting

Darktable is installed from OpenSuse, so I am not sure if this error is coming from that as we seem to be checking the deb.nodesource. (this part is way above my skill level!!)

Anyone help offered to get the install working, will be gratefully received.

TIA,
Colin

I believe that is an issue with the darktable key messing up your keys, so nothing to do with node-red. Whether that is a fatal error with the script I don't know.
You shouldn't install nodejs manually, let the script do it. I suggest uninstalling nodejs and npm and rerun the script. Paste the full log here if it still doesn't work.

1 Like

Excellent! Thank you!!

Removed Darktable, manually deleted key - didn't show with

sudo apt-key list

But the other keys did.

Ran script, all installed now.

Strange as I used the same setup with 18.04 and all was OK, I'll moot it with Darktable Devs as the keyfile had gpg in the logo using File Manager, the rest didn't. :thinking:

1 Like

FYI

Re-installed Darktable using OpenSUSE (possibly more important than Node-RED on this computer :joy:), ran script again and all OK.

Same Icon in File Manager (gpg showing), still doesn't show in apt-key list.

Thank you!
Colin

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