为什么我不能简单地安装最新的 nodejs。 我已经执行了 curl -sL https://deb.nodesource.com/setup_7.x |须藤 -E 庆典 - 之后我执行了以下
ubuntu@ip-172-31-2-33:/$ sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 188 not upgraded.
ubuntu@ip-172-31-2-33:~$ which node
ubuntu@ip-172-31-2-33:~$ which nodejs
ubuntu@ip-172-31-2-33:~$ whereis node
node:
ubuntu@ip-172-31-2-33:~$ whereis nodejs
nodejs:
ubuntu@ip-172-31-2-33:/$ node -v
The program 'node' can be found in the following packages:
* node
* nodejs-legacy
操作系统是 Ubuntu 14.04
最佳答案
试运行:
which nodejs
如果此命令有结果,则获取该目录位置并使用“Node ”名称为其创建符号链接(symbolic link)。
命令应该是这样的:
sudo ln -s /usr/bin/nodejs /usr/bin/node
关于node.js - 在 Ubuntu 14.04 上按照最新的 nodejs 安装步骤有什么问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42822440/