NVM installation under Deepin [npm + node]

System environment: deepin (Ubuntu 18.04 is also applicable)


  1. sudo apt update && apt upgrade -y
    During the system update, select yes for all prompts, and restart the system after the end (based on the system just installed)
    sudo reboot
  2. Install git.
    sudo apt install git -y
    If there is one in the system, there is no need to install it, generally there is no? I heard that it is generally available, but I have not used it. . .
  3. Install wget
    sudo apt install wget -y
  4. If you encounter a prompt about insufficient permissions to install nvm , add sudo
    nvm before the command to
    create the directory
    mkdir -p /usr/local/nvm
    for nodejs and npm . Download the source code.
    git clone https://github.com/nvm-sh/nvm.git /usr/local/nvm
    Switch the directory.
    cd /usr/local/nvm
    Install.
    ./install.sh
    Add Taobao mirror.
    export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/dist
    Restart the configuration file. You can restart Linux to
    source ~/.bash #输入到这的时候按两下Tab键看看到底是哪一个 我用的deepin是.bashrz | Ubuntu应该是bash_profile
    start the installation.
    nvm install stable
  5. verification
    node -v

Guess you like

Origin blog.csdn.net/qq_41238308/article/details/106054751
Recommended