NodeJS 已安装但不会 运行
NodeJS is already installed but won't run
我在 VPS 服务器上 运行ning Ubuntu 18,我正在尝试 运行 NodeJS,但是,发生了这种情况:
seth@vps186104:~$ nodejs -v
Command 'nodejs' not found, but can be installed with:
sudo apt install nodejs
seth@vps186104:~$ sudo apt install nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version (8.10.0~dfsg-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
seth@vps186104:~$
它说要将软件包安装到 运行 nodejs,但是,尝试安装 nodejs 它说它已经安装
怎么回事?
尝试 运行:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
或者如果你想要节点 10。
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
我在 VPS 服务器上 运行ning Ubuntu 18,我正在尝试 运行 NodeJS,但是,发生了这种情况:
seth@vps186104:~$ nodejs -v
Command 'nodejs' not found, but can be installed with:
sudo apt install nodejs
seth@vps186104:~$ sudo apt install nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version (8.10.0~dfsg-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
seth@vps186104:~$
它说要将软件包安装到 运行 nodejs,但是,尝试安装 nodejs 它说它已经安装 怎么回事?
尝试 运行:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
或者如果你想要节点 10。
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs