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 such file or directory
I can see node in the /usr/sbin/
directory, though.
Writing npm --version
shows 1.3.5
Writing nodejs --version
shows v0.10.15
Also, I can see node in the /usr/bin/
directory.
So, how do I get node
working?
Also, If I use zsh instead of bash, then node
command works.
I had created a symlink, but it still wasn't working.
I forgot to restart my terminal (my putty connection). After I had it worked without the symlink :)
If you are on an AWS EC2 instance running an Ubuntu instance (tested on Ubuntu 16.x), then these steps might work for you:
If all is correct the last command shall have an output like : v6.x.x
If not then run the following:
Hopefully this will help. It helped me magically (hehe).