I am quite new to Ubuntu and I am trying to install node.js on 12.04. I have the source code in a tar.gz. I am not sure what I need to do with this file. I guess I need to extract it but is there a recommended place I extract it too? Also after extracting it should I just be able to use it from the command line or do I need to do anything else?
2 Answers
This may not be the solution you are looking for, but here are instructions on how to install the latest version of node.js on Ubuntu without needing any tar.gz files.
sudo apt-get update
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
sameetandpotatoes answer is probably the easiest and most effective way to install the latest version of node.js. However, if you would still like to use the tar file you can first extract to a directory of your choosing with the following command:
tar -xvf node.tar.gz -C /path/to/dir
Once the file is extracted, there should be a README file that will give you instructions on how to use the recently extracted files to install node.js on your computer. Hope this helps you out but once again sameetandpotatoes answer is by far the easiest.