繁体   English   中英

在Ubuntu 14.04上安装最新nodejs的安装步骤有什么问题?

[英]What is wrong with following installation steps of latest nodejs on Ubuntu 14.04?

为什么我不能简单地安装最新的nodejs。 我已经执行了curl -sL https://deb.nodesource.com/setup_7.x | sudo -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

如果此命令有结果,则获取该目录位置并使用“node”名称为其创建符号链接。

该命令应如下所示:

sudo ln -s /usr/bin/nodejs /usr/bin/node

清除和安装工作:

sudo apt-get purge nodejs*
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_4.x | sudo bash -
sudo apt-get install -y nodejs
which nodejs

在/ usr / bin中/的NodeJS

which node

的/ usr /斌/节点

node -v

v7.7.3

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM