Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I installed node.js with these commands:

$ sudo git clone --depth 1 https://github.com/joyent/node.git
$ 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 http://github.com/isaacs/npm.git
$ 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 https://github.com/isaacs/ronnjs/tarball/master

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

1 Answer 1

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

 
discard

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.