Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Can't install node.js on Linux server

Can't install node.js on Linux server


I followed some instructions to Install node.js on a Linux server and ran in to the following blocks. I started out by doing sudo apt-get install python-software-properties and that worked fine. Then, I did sudo add-apt-repository ppa:chris-lea/node.js. But, wait - there is no command add-apt-repository. OK, so I looked it up and it told me to do apt-get install software-properties-common and that would have been fine, except it gave me this error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package software-properties-common

Well, what can I do to get node.js on my server? Obviously, none of this works and it's Debian, in case you were wondering. I really need help on this. Basically, how can I install software-properties-common if it does not exist? It just won't show up.

Problem courtesy of: riyoken


For a Debian install of the latest node.js, you should follow these instructions, not requiring you to add the PPA:

sudo apt-get install python g++ make checkinstall
mkdir ~/src && cd $_
wget -N
tar xzvf node-latest.tar.gz && cd node-v*
checkinstall #(remove the "v" in front of the version number in the dialog)
sudo dpkg -i node_*

UPDATE: I wrote this a long time ago. Since then, I find using nvm a much less painful way to get node onto machines. As per link, steps are basically reduced to:

  • curl -o- | bash
  • nvm install node
Solution courtesy of: Leon Stafford


View additional discussion.

This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Can't install node.js on Linux server


Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription