Ubuntu安装Node.js Ubuntu安装Node.js 通过PPA安装1curl -sL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh 1sudo bash nodesource_setup.sh 1sudo apt install nodejs 1node -v 通过这种方式安装,由于nodejs包中已经包含了node和npm,所以不需要单独安装npm了。