使用 nvm 安装 nodejs
0. 事情准备
sudo dnf install bzip2-devel
1. 安装 nvm
refer: https://github.com/nvm-sh/nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
source /home/<your_user_name>/.bashrc
2. 安装 nodejs
安装 nodejs 18 版本,
nvm install 18
确认 node 版本,
node -v
输出结果,
v18.17.0
确认 npm 版本,
npm -v
输出结果,
9.6.7
完结!