Nodejs/install

来自通通笔记

Nodejs的安装日常

使用nvm.sh快速安装和管理node不同版本

nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions (github.com)

coreybutler/nvm-windows: A node.js version management utility for Windows. Ironically written in Go. (github.com)

安装方法:

https://github.com/nvm-sh/nvm#install--update-script


更换为国内镜像源:

export NVM_NODEJS_ORG_MIRROR=https://mirrors.tuna.tsinghua.edu.cn/nodejs-release/

源码安装

安装时提示:

Node.js configure: Found Python 3.8.10...
WARNING: failed to autodetect C++ compiler version (CXX=g++)
WARNING: failed to autodetect C compiler version (CC=gcc)

解决:

#安装gcc编译器
sudo apt install gcc
sudo apt install build-essential