国产探花免费观看_亚洲丰满少妇自慰呻吟_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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 洛扎县| 肃宁县| 醴陵市| 团风县| 泰顺县| 信阳市| 额尔古纳市| 平阳县| 始兴县| 凌源市| 平乐县| 遵义市| 迁西县| 宣化县| 手游| 建阳市| 抚州市| 宁晋县| 青神县| 光泽县| 万全县| 乌苏市| 黄平县| 西华县| 仁布县| 福安市| 双流县| 新建县| 汪清县| 崇州市| 南充市| 抚顺市| 聊城市| 柞水县| 阿拉尔市| 若羌县| 丹寨县| 手游| 宁波市| 涿鹿县| 无为县|