node.js - 在 Ubuntu 14.04 上按照最新的 nodejs 安装步骤有什么问题?

标签 node.js ubuntu ubuntu-14.04

为什么我不能简单地安装最新的 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/

相关文章:

linux - 自从安装了 Docker/Discourse 之后,GitLab 就不再工作了

php - file_put_contents 不起作用

javascript - Nodejs - 获取运行进程的环境变量

javascript - 来自 URL 的 Nodejs 查询不起作用

git - 如何使用旧的 SSH key 从 Windows 到 Ubuntu?

java - 如何在 Ubuntu 中管理不同版本的 Java

ubuntu - Sublime Text 3 : XDebug does not stop in breakpoints anymore

node.js - Firebase 云消息传递 - 具有多个主题 - 没有消息重复

node.js - 如何让 window.onload 函数在 Jade 模板语言中工作

java - 如何将环境变量设置为localhost?