zoukankan      html  css  js  c++  java
  • Ubuntu安装nodejs和yarn

    安装nodejs

    nodejs 的每个大版本号都有相对应的源,比如这里的 10.x.x版本的源是https://deb.nodesource.com/setup_10.x。
    输入命令:

    curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

    接着输入命令:

    sudo apt-get install -y nodejs

    等待安装完成。
    *如果你要安装12.x.x 的版本,只需要修改添加源地址中的数字即可:

    curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

    最后验证:nodejs -v 即可出现安装的nodejs版本。

    安装yarn

    1、添加GPG密钥

    curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

    2、添加Yarn存储库

    echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

    3、更新包列表并安装Yarn

    sudo apt update
    sudo apt install yarn

    4、检查Yarn的版本

    yarn --version
  • 相关阅读:
    软考相关试题
    qt中的toUtf8, toLatin1, Local8bit, toUcs4(转)
    qt的中文乱码问题
    《左耳听风》-ARTS-打卡记录-第八周
    杂题
    图论
    基础数据结构
    整除
    同余
    常用数学
  • 原文地址:https://www.cnblogs.com/darklights/p/12857544.html
Copyright © 2011-2022 走看看