build node and npm on linux from git repo

First installs the git and other build tool, then checkout node repository from github. cd into the node folder, and checkout the version of git that you want to install, the version number for the latest stable version can be found from the, then run the configure and make and install.

sudo yum install git gcc-c++ make openssl-devel java-1.7.0-openjdk-devel
git clone git://
cd node
git checkout v0.10.29
sudo make install

After the node is stalled, it’s usually installed in /usr/local/bin/node, and you might run into issue where the node command is not found when installing the npm because npm installs as nobody so it won’t look into the folder /usr/local/bin/ for node. A remedy for this is to make a symbolic link in /usr/bin/node

which node
ln -s /usr/local/bin/node /usr/bin/node

Go back to the home directory, git clone the npm repo from github, cd into the npm directory and make install.

git clone
cd npm
sudo make install

Search within Codexpedia

Custom Search

Search the entire web

Custom Search