1. 安装 gcc-c++
yum install -y gcc-c++
2. 修改源
NodeJS 12.x
curl -sL https://rpm.nodesource.com/setup_12.x | bash -
NodeJS 11.x
curl -sL https://rpm.nodesource.com/setup_11.x | bash -
NodeJS 10.x
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
NodeJS 8.x
curl -sL https://rpm.nodesource.com/setup_8.x | bash -
参考自:https://github.com/nodesource/distributions
https://nodejs.org/en/download/package-manager/#android
3. 安装 nodejs
yum install -y nodejs
4. 验证安装
node -v
npm -v
能够显示正确的版本号即为成功
参考自: https://electronjs.org/docs/tutorial/development-environment#setting-up-linux