Node.js I';我是Ubuntu的新手,我可以';我似乎无法让这个Curl命令起作用。如何在Ubuntu 16.04上安装nodejs 7.x?

Node.js I';我是Ubuntu的新手,我可以';我似乎无法让这个Curl命令起作用。如何在Ubuntu 16.04上安装nodejs 7.x?,node.js,ubuntu,curl,sudo,discord,Node.js,Ubuntu,Curl,Sudo,Discord,curl命令在尝试输入时失败,表示“bash:-d:command error解决了它,我不知道为什么,但我必须键入: sudo apt-get update&&sudo apt-get dist-upgrade sudo apt-get install curl sudo apt-get install python-software-properties curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash

curl命令在尝试输入时失败,表示“bash:-d:command error

解决了它,我不知道为什么,但我必须键入:

sudo apt-get update&&sudo apt-get dist-upgrade
sudo apt-get install curl
sudo apt-get install python-software-properties
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
这看起来实际上是安装4.2,删除它,然后安装7.x

sudo apt-get install -y nodejs
sudo apt-get purge nodejs npm
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs