Installing in WSL2

I did a quick search, and found some instructions here:

Just checking to see if this info is up to date before proceeding?

I tried running sudo -d install node-red but got:

sudo: invalid option -- 'd'
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-T timeout] [-u user] file ...

Is the alternate-node-red-installer my only option?

I would've asked there, but the topic is closed.

Node-RED is a node.js app so you can install it by doing npm install node-red --unsafe-perm in a convenient folder. You can also do the usual npm -g install node-red --unsafe-perm to install it globally if you prefer.

It is unlikely that Dave's Pi install script will work because WSL doesn't include systemd I don't think.

My alternate installer simply installs node-red locally as in the first command I gave. But it sets up the folder and some other conveniences for you as well.

In all cases, you need to have installed node.js first and possibly npm install -g build-essentials (not sure about that last, been a while since I installed on WSL.

Cool, global install it is then.
Ran npm -g install node-red --unsafe-perm, everything went well, and seems to work as intended.

It seems npm install -g build-essentials is not of any use for WSL installations.

Thank you.

1 Like

@TotallyInformation is there a typo in option 2 in the link in the first message above ?

1 Like

Quite possibly - what typo?

@TotallyInformation I believe he is referring to the command sudo -d install node-red as I'm not sure what that is supposed to be.

Oh right, yes I just ignored that as it was the wrong command of course, I gave the right one.

Would it be worth correcting the original posting at (which you wrote I believe, in case you hadn't noticed).

Oh, well why didn't someone tell me it was my text! :smiley:


1 Like

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