[英]Error after installing Node.js in Linux
I am getting following error after typing $ node - version in My Linux Machine: 在我的Linux机器中输入$ node-version后,出现以下错误:
Error: unrecognized flag -
Try --help for options
module.js:340
throw err;
^
Error: Cannot find module '/home/ojas/version'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:935:3
I have used following Commands while Installing: 我在安装时使用了以下命令:
$ sudo apt-get install python-software-properties
$ curl -sL https://deb.nodesource.com/setup | sudo bash -
$ sudo apt-get update
$ sudo apt-get install nodejs
Two things to point out: 有两点要指出:
- The executable is called nodejs
and not node
, in Ubuntu. -在Ubuntu中,可执行文件称为
nodejs
而不是node
。
- The flag is --version
-标志是
--version
~$ nodejs --version
v0.10.25
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.