ubuntu 安装将nodo降低版本到6.17.

查看当前的node npm版本     

卸载当前已有的nodejs npm

sudo apt remove nodejs npm

安装 Node.js

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash  -

echo "

deb https://mirrors.tuna.tsinghua.edu.cn/nodesource/deb_6.x trusty main

deb-src https://mirrors.tuna.tsinghua.edu.cn/nodesource/deb_6.x/ trusty main

" | sudo tee /etc/apt/sources.list.d/nodesource.list

上边命令需要改成一行才能正确执行   分多行是为了更好阅读

sudo apt-get update

sudo apt-get install -y nodejs

查看当前 node npm

你可能感兴趣的:(ubuntu 安装将nodo降低版本到6.17.)