国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

CentOS 7.6下安裝 NVM 管理不同版本的 Node.js

2024-08-28 00:23:05
字體:
來源:轉載
供稿:網友

nvm全稱Node Version Manager是 Nodejs 版本管理器,它讓我們能方便的對 Node.js 的版本進行切換。 nvm 的官方版本只支持 Linux 和 Mac。 Windows 用戶,可以用 nvm-windows。詳情請點擊官方說明。

安裝NVM

查資料得出,要使用 curl 或 wget 來安裝nvm(版本可以選用官網最新版):

[linuxidc@localhost www.linuxidc.com]$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash

輸出示例如下:

  % Total    % Received % Xferd  Average Speed  Time    Time    Time  Current
                                Dload  Upload  Total  Spent    Left  Speed
100 13527  100 13527    0    0  22484      0 --:--:-- --:--:-- --:--:-- 22545
=> Downloading nvm from git to '/home/linuxidc/.nvm'
=> 正克隆到 '/home/linuxidc/.nvm'...
remote: Enumerating objects: 286, done.
remote: Counting objects: 100% (286/286), done.
remote: Compressing objects: 100% (256/256), done.
remote: Total 286 (delta 34), reused 93 (delta 17), pack-reused 0
接收對象中: 100% (286/286), 146.90 KiB | 0 bytes/s, done.
處理 delta 中: 100% (34/34), done.
=> Compressing and cleaning up git repository

=> Appending nvm source string to /home/linuxidc/.bashrc
=> Appending bash_completion source string to /home/linuxidc/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && /. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && /. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

CentOS 7.6下安裝 NVM 管理不同版本的 Node.js

或:

[linuxidc@localhost www.linuxidc.com]$ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash

注意:安裝完了,重新打開終端 Terminal來重啟會話

安裝 Node.js

最新版

1、安裝最新版 Node.js 命令:

[linuxidc@localhost www.linuxidc.com]$ nvm install node
Downloading and installing node v12.11.1...
Downloading https://nodejs.org/dist/v12.11.1/node-v12.11.1-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v12.11.1 (npm v6.11.3)
Creating default alias: default -> node (-> v12.11.1)

CentOS 7.6下安裝 NVM 管理不同版本的 Node.js

2.查看安裝效果,命令:

[linuxidc@localhost www.linuxidc.com]$ nvm use node

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 镶黄旗| 阿巴嘎旗| 灵宝市| 新和县| 当阳市| 潼关县| 独山县| 宁明县| 舞钢市| 嘉义市| 茶陵县| 泊头市| 上杭县| 蓬安县| 湛江市| 南和县| 大港区| 孝昌县| 旬阳县| 文昌市| 五家渠市| 八宿县| 永丰县| 梁平县| 砚山县| 桂平市| 库伦旗| 揭东县| 莱州市| 平湖市| 榕江县| 烟台市| 南召县| 舞钢市| 高密市| 昭苏县| 蓬莱市| 亳州市| 丹棱县| 丰顺县| 神农架林区|