在linux上安装node,我们需要现在官网(https://nodejs.org)中下载二进制文件。然后进行安装:
解压到打算安装的目录
VERSION=v10.15.0DISTRO=linux-x64sudo mkdir -p /usr/local/lib/nodejssudo tar -xJvf node-$VERSION-$DISTRO.tar.xz -C /usr/local/lib/nodejs
在 ~/.profile
VERSION=v10.15.0DISTRO=linux-x64export PATH=/usr/local/lib/nodejs/node-$VERSION-$DISTRO/bin:$PATH
profile
. ~/.profile
