I installed nodejs and then node using aptitude. After that I purged node and created a link from /usr/bin/nodejs to /usr/bin/node. Now, when I typed node, for some unknown reason it keeps looking in sbin instead of bin. To check I purged nodejs too and typed both node and nodejs and following is the output.
(mvenv)username@mymachine:~$ node
-bash: /usr/sbin/node: No such file or directory
(mvenv)username@mymachine:~$ nodejs
-bash: /usr/bin/nodejs: No such file or directory
Any explanation why typing node makes bash to look inside sbin instead of bin whereas for a similar command nodejs it looks in bin? And how can I possibly break this sbin link and restore to bin?
All I needed to do was rehash. So, typing the following solved it.
$ hash -r
Thanks Etan Reisner for this too. It deletes missing links.
$ hash -d node nodejs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With