节点无法在 Windows 上的 Ubuntu 上使用 Bash
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39555949/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
node not working on Bash on Ubuntu on Windows
提问by Klas Mellbourn
I am trying to make node work inside Bash on Ubuntu on Windows.
我正在尝试使节点在 Windows 上的 Ubuntu 上的 Bash 中工作。
I am just starting out with using Bash on Ubuntu on Windows, so I am probably doing some newbie mistake.
我刚开始在 Windows 上的 Ubuntu 上使用 Bash,所以我可能犯了一些新手错误。
I have done apt-get install
on node
我已经完成apt-get install
了node
# sudo apt-get install node
Reading package lists... Done
[...]
That command gives reasonable output.
该命令给出了合理的输出。
But when I actually try to run the command I get no response whatsoever. No error message, nothing
但是当我实际尝试运行该命令时,我没有得到任何响应。没有错误信息,什么都没有
# node -v
# node
#
What am I doing wrong?
我究竟做错了什么?
采纳答案by masoud
To install NodeJS in ubuntu, install nodejs
package:
要在 ubuntu 中安装 NodeJS,请安装nodejs
包:
wget -qO- https://deb.nodesource.com/setup_6.x | sudo bash -
sudo apt-get install nodejs
The package node
is not related to NodeJS.
该包node
与 NodeJS 无关。