zoukankan      html  css  js  c++  java
  • Ubuntu 20.04 安装 Node.js

    Installation instructions

    Node.js v14.x:

    # Using Ubuntu
    curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
    sudo apt-get install -y nodejs
    
    # Using Debian, as root
    curl -sL https://deb.nodesource.com/setup_14.x | bash -
    apt-get install -y nodejs

    Node.js v12.x:

    # Using Ubuntu
    curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
    sudo apt-get install -y nodejs
    
    # Using Debian, as root
    curl -sL https://deb.nodesource.com/setup_12.x | bash -
    apt-get install -y nodejs

    Node.js v10.x:

    # Using Ubuntu
    curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
    sudo apt-get install -y nodejs
    
    # Using Debian, as root
    curl -sL https://deb.nodesource.com/setup_10.x | bash -
    apt-get install -y nodejs

    Node.js LTS (v12.x):

    # Using Ubuntu
    curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
    sudo apt-get install -y nodejs
    
    # Using Debian, as root
    curl -sL https://deb.nodesource.com/setup_lts.x | bash -
    apt-get install -y nodejs

    Node.js Current (v14.x):

    # Using Ubuntu
    curl -sL https://deb.nodesource.com/setup_current.x | sudo -E bash -
    sudo apt-get install -y nodejs
    
    # Using Debian, as root
    curl -sL https://deb.nodesource.com/setup_current.x | bash -
    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:

    # use `sudo` on Ubuntu or run this as root on debian
    apt-get install -y build-essential

    Installation Registry

    npm config set registry https://registry.npm.taobao.org
    npm install nrm

    sudo gedit ~/.npmrc

    registry="https://registry.npm.taobao.org/"
    sass_binary_site="https://npm.taobao.org/mirrors/node-sass/"
    phantomjs_cdnurl="http://npm.taobao.org/mirrors/phantomjs/"
    electron_mirror="https://npm.taobao.org/mirrors/electron/"

    Clean Npm Cache


    npm cache clean -f
        
  • 相关阅读:
    车牌号验证正则验证
    人民币转大写
    Base64 格式图片上传至服务器
    郭博分析modbus主机模式
    解决小BUG的罗列
    写flash时为什么需要先擦除?
    C语言的很吊的printf-----来自一个C语言竞赛题目
    ( # #@ ## 在define中的应用)或( 连接两个字符串或者两个数字、强制转化成单引号、强制转化成双引号 )附加字符串强制转化成数字
    IAR无法goto的解决办法
    link list
  • 原文地址:https://www.cnblogs.com/Areas/p/13466392.html
Copyright © 2011-2022 走看看