How can I compile/install node.js on Ubuntu? It failed with an error about cxx compiler
.
For Node.js v6:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
For Node.js v7:
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
Optional: install build tools To compile and install native addons from npm you may also need to install build tools:
sudo apt-get install -y build-essential
After to get latest NPM packages, if you need:
npn update -g
Partial source here.