【发布时间】:2017-03-16 07:48:38
【问题描述】:
为什么我不能简单地安装最新的 nodejs。 我已经执行 curl -sL https://deb.nodesource.com/setup_7.x |须藤 -E bash - 之后我执行了以下操作
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。我在 Vagrant 配置中遇到了类似的问题,解决方案是将/usr/bin/中存在的nodejs包软链接到同一目录中的node。
标签: node.js ubuntu ubuntu-14.04