Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed node.js with these commands:

$ sudo git clone --depth 1
$ cd node
$ export JOBS=2
$ sudo mkdir ~/local
$ sudo ./configure --prefix=$HOME/local/node
$ sudo make
$ sudo make install
$ export PATH=$HOME/local/node/bin:$PATH

It executed without error. Not sure how to confirm that node.js is actually installed though.

I then tried to install node package manager with the following commands:

$ sudo git clone
$ cd npm
$ sudo make install

The last command had a lot of output but the last few lines were:

make[1]: Entering directory `/var/www/node/npm'

node cli.js install

bash: node: command not found

make[1]: * [node_modules/ronn] Error 127

make[1]: Leaving directory `/var/www/node/npm'

make: * [man/man3/author.3] Error 2

npm does not get installed, but the directory is there. Not sure what I need to do?

share|improve this question

On ubuntu your path is not copied into the sudo context. For last command try:

$ sudo env PATH=$HOME/local/node/bin:$PATH make install
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.