Node.js命令行未执行

时间:2019-10-20 12:33:30

标签: node.js ubuntu ubuntu-18.04

我有一个Ubuntu 18.04服务器,我想安装Node.js。

我执行以下命令:


root@ubuntu:~# curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
root@ubuntu:~# apt-get install nodejs -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nodejs is already the newest version (10.16.3-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


root@ubuntu node -v

Command 'node' not found, but can be installed with:

apt install nodejs


root@ubuntu:~# which node
root@ubuntu:~# which nodejs

如何解决此问题?

0 个答案:

没有答案
相关问题