ubuntu16.04 install node.js, npm

ubuntu16.04 install node.js, npm

  1. Please try to avoid using apt-get to install node.js on Ubuntu. If you have already done this, please remove it manually:
sudo apt-get purge nodejs && sudo apt-get autoremove && sudo apt-get autoclean
  1. Use the following command to install NVM (install node.js via NVM):
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
  1. Test whether NVM is installed successfully under the command line (you may need to restart the system before you can use NVM):
nvm --version
  1. Use the following command to install node.js 8.* LTS version (long-term maintenance version):
nvm install 8.11.2
  1. Set the system default version:
nvm use 8.11.2
nvm alias default8.11.2
  1. Check the node.js version:
node -v
  1. npm uses Taobao mirror:
npm config set registry=https://registry.npm.taobao.org
  1. Update npm to the latest version:
npm install -g npm
  1. The installation is complete, check the npm version:
npm -v

Author: Time Rose
Source: CSDN
Original: https://blog.csdn.net/qq_28263253/article/details/81809067
Copyright statement: This article is the original article of the blogger, please attach the link to the blog post if you reprint it!

Recommended Posts

ubuntu16.04 install node.js, npm
ubuntu install nodejs
Install nodejs and npm under Ubuntu 16.04
Install node.js under Ubuntu
Install nodejs10 on Ubuntu16
CentOS6.8 install node.js npm
ubuntu18.04 install python2
ubuntu18.04 install docker
ubuntu12.04 install python3
ubuntu 16 install asp.net
ubuntu install leanote
ubuntu install Jenkins
docker install ubuntu
ubuntu install elasticsearch
ubuntu16.0.1 install pagoda
CentOS install nodejs 8
ubuntu18.04 install python
ubuntu 18.04 install teamviewer
ubuntu install sendmail
Install apache+PHP under Ubuntu
install vscode on ubuntu18
Install mysql-pytho in Ubuntu
ubuntu install zsh terminal
Install Redis on Ubuntu
Install R4 on ubuntu20
Install postgresql-10 on Ubuntu 18.04
Install python3.6 under Ubuntu 16.04
Install docker on Ubuntu
Ubuntu18.04 install opencv 3.2.0 solution
Install mysql under Ubuntu 16.04
Install Thrift under ubuntu 14.10
Install OpenJDK10 under Ubuntu
Install Caffe under Ubuntu 14.04
Install Docker on ubuntu18.04
Install Node.js on Centos
ubuntu install harbor warehouse
Install mysql on Ubuntu 14.04
Ubuntu16.04 install Mongodb tutorial
Install Django on ubuntu
2018-09-11 Install arduino under Ubuntu
Install Python3 on Ubuntu 14.04
Ubuntu18.04 install Asterisk16.10 + FreePBX15.0
Ubuntu19 install MySQL pit
Centos6.9 install npm environment
Install rJava on Ubuntu18
How to install Node.js and npm on CentOS 8
Install JDK10+ on Ubuntu
pcduino ubuntu install os
Install python in Ubuntu
Install JDK in Ubuntu19.10
Install Python3 on Ubuntu 16.04
Install ROS under ROS Ubuntu 18.04[2]
Install MySQL under Ubuntu
Install KDE on Ubuntu16.04.2
ubuntu install nginx server
Install Yarm-PM2 under Ubuntu
Install Docker on Ubuntu18
Install Python3.7 on Ubuntu
Install flashplayer on Ubuntu
ubuntu: install camera driver
ubuntu14.04 install jdk1.8 tutorial