zoukankan      html  css  js  c++  java
  • ubuntu16.04安装node.js、npm

    ubuntu16.04安装node.js、npm
    1.请尽量避免在 Ubuntu 上使用 apt-get 来安装 node.js, 如果你已经这么做了,请手动移除:

    sudo apt-get purge nodejs && sudo apt-get autoremove && sudo apt-get autoclean

    2.使用以下命令安装 NVM(通过NVM安装node.js):

    curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

    3.命令行下测试NVM是否安装成功(在这之前可能需要重启一下系统才能使用NVM):

    nvm --version

    4.使用以下命令安装node.js 8.* LTS 版本 (长久维护版本):

    nvm install 8.11.2

    5.设置系统默认版本:

    nvm use 8.11.2
    nvm alias default 8.11.2

    6.检测node.js版本:

    node -v

    7.npm使用淘宝镜像:

    npm config set registry=https://registry.npm.taobao.org

    8.npm更新到最新版本:

    npm install -g npm

    9.安装完成,检测npm版本:

    npm -v

    ---------------------
    作者:时间玫瑰
    来源:CSDN
    原文:https://blog.csdn.net/qq_28263253/article/details/81809067
    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    cf 811c Vladik and Memorable Trip
    Codeforces 837D--Round Subset (DP)
    codeforces798C
    Codeforces 814C
    CodeForces 610D Vika and Segments
    CodeForces 593D Happy Tree Party
    hdu 5564 Clarke and digits
    hdu 5517 Triple
    codeforces 584E Anton and Ira [想法题]
    codeforces 582A GCD Table
  • 原文地址:https://www.cnblogs.com/little-kwy/p/10394055.html
Copyright © 2011-2022 走看看