Trying with
curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
But getting
## Confirming "n/a" is supported...
+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_12.x/dists/n/a/Release'
## Your distribution, identified as "n/a", is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for support
sudo curl -sL https://deb.nodesource.com/setup_lts.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt-get install -y nodejs
node -v
Thank you so much it's easy
Most helpful comment
sudo curl -sL https://deb.nodesource.com/setup_lts.x -o nodesource_setup.sh
å°†nodesource_setup.shä¸ DISTRO=$(lsb_release -c -s) 修改为 DISTRO=stable
sudo bash nodesource_setup.sh
sudo apt-get install -y nodejs
node -v