I have installed Nodejs in Ubuntu 12 from source ( ./configure && make && sudo make install ) and all done successfully.
when i run
which node
/usr/local/bin/node
But when i run
node server.js
i got:
-bash: /usr/sbin/node: No such file or directory
I echo my path:
echo $PATH
/root/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/mysql/server-5.6/bin
/usr/local/bin is in the PATH.
I found Node.js not found. the same question. but i can not make it work by "sudo ln -s /usr/sbin/node /usr/local/bin/node" because "ln: failed to create symbolic link `/usr/local/bin/node': File exists"