You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sudo apt install build-essentials -y
## Remove any old repositories/PPA## add-apt-repository may not be present on some Ubuntu releases:# sudo apt-get install python-software-properties
sudo add-apt-repository -y -r ppa:chris-lea/node.js
sudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list
sudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list.save
## Add nodesource signing key
curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
# wget can also be used:# wget --quiet -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add
# Replace with the branch of Node.js or io.js you want to install: node_6.x, node_8.x, etc...
VERSION=node_8.x
DISTRO="$(lsb_release -s -c)"echo"deb https://deb.nodesource.com/$VERSION$DISTRO main"| sudo tee /etc/apt/sources.list.d/nodesource.list
echo"deb-src https://deb.nodesource.com/$VERSION$DISTRO main"| sudo tee -a /etc/apt/sources.list.d/nodesource.list
## Update package list and install nodejs
sudo apt-get update
sudo apt-get install -y nodejs