nodejs vs node on ubuntu 12.04

前端 未结 20 2180
Happy的楠姐
Happy的楠姐 2020-11-22 12:29

I installed nodejs on ubuntu from instructions given here

When I write node --version in the terminal I see this :
-bash: /usr/sbin/node: No

20条回答
  •  旧巷少年郎
    2020-11-22 13:11

    I have the same issue in Ubuntu 14.04.

    I have installed "nodejs" and it's working, but only if I'm use command "nodejs". If I try to use "node" nothing happens.

    I'm fixed this problem in next way:

    1. Install nodejs-legacy

      sudo apt-get install nodejs-legacy

    After that, when I type "node" in command line I'm get an error message "/usr/sbin/node: No such file or directory"

    1. Second, what I did, it's a symbolic link on "nodejs":

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

提交回复
热议问题