I have untarred node.js from the tar file given on nodejs.org, but when i try executing my js program through node command nothing happens, but on the other hand nodejs comm
For sure available 'node' package is not related to nodejs.
Just take a look at this node from here:
https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
There is a naming conflict with the node package (Amateur Packet Radio Node Program), and the nodejs binary has been renamed from node to nodejs. You'll need to symlink /usr/bin/node to /usr/bin/nodejs or you could uninstall the Amateur Packet Radio Node Program to avoid that conflict.
So it seems like you may purge that radio program with
dpkg --purge node
And then install nodejs via one of common ways f.e. from precompiled deb packages available like this:
sudo apt-get update
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
But nodejs updates faster than packages so after you will get any nodejs version available it's more efficient to use this module for managing nodejs versions - https://github.com/visionmedia/n
At least after some tests this solution looks most suitable for me at mac os.