node.js npm install issue

I followed this instruction.

My linux box is CentOS 5.5 so if you have ubuntu refer to this site to get node, and socket.io in place.

NodeJS

  1. Make sure you have git installed, or just get it:

sudo yum install git

  1. Get the last source for node from it's github site:

git clone http://github.com/ry/node.git && cd node

./configure

make

make install

  1. Now you've be able to run the "node -v" command and get the current version installed.

Node Package Manager (NPM)

This is a package manager, similar to gems in the ruby world. The installation is quite simple:

curl http://npmjs.org/install.sh | sh

And that's it.

Express

As you've got NPM installed the next steps are really easy, just let NPM do all the work for you:

npm install express

express -v

You should be seeing the express version installed in your system.

=================================

succeded installing node.js

if i type node -v

it says v0.2.5

after that,

i tried to install npm

but it says

[root@gcloud node]# curl http://npmjs.org/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0    85    0    85    0     0    128      0 --:--:-- --:--:-- --:--:--   395
sh: line 1: syntax error near unexpected token `newline'
sh: line 1: `<html>Moved: <a href="https://npmjs.org/install.sh">https://npmjs.org/install.sh</a>'

i tried other commands,

curl -O https://npmjs.org/install.sh sudo sh install.sh

it says

[root@gcloud node]# curl -s https://npmjs.org/install.sh > npm-install-$$.sh
[root@gcloud node]# sh npm-install-*.sh
tar=/bin/tar
version:
tar (GNU tar) 1.23
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason. You are using an outdated and unsupported version of node (v0.2.5). Please update node and try again.

As the error suggests, you've installed a version of Node that isn't supported by the version of npm you're trying to install:

You are using an outdated and unsupported version of node (v0.2.5). Please update node and try again.

The latest stable release of Node is v0.10.13. You can download its source code from the "Download" page or from the blog entry. There are also a number of pre-compiled binary archives available for different systems.

You can also find an updated Installation Guide in the project's wiki, as well as instructions for installing via package managers including installing via yum for CentOS.

Also note that Node's git repository moved to https://github.com/joyent/node quite a while ago.