I am using an Amazon EC2 instance using CentOs 5.4. I installed nodejs in different servers that follow the same architecture. In the current server I installed nodejs by following the below steps.
Installing Python
yum install gcc zlib-devel python-setuptools readline-devel
cd /usr/src
wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz
tar -xzf Python-2.7.5.tgz
cd Python-2.7.5
./configure
make altinstall
python2.7 -V
Installing NODEJS
sudo yum groupinstall 'Development Tools'
sudo yum install openssl-devel
cd /usr/local/
wget http://nodejs.org/dist/node-latest.tar.gz
tar zxvf node-latest.tar.gz
cd node-v0.10.34
PYTHON=/usr/local/bin/python2.7
export PYTHON
set | grep PYTHON
python2.7 configure && make && make install
node --version
But the issue is, when ever I run the "node" command I see the following image.
I am not sure what has happened and how to debug it? Everything seems to be installed properly.
EDIT #1
From nodejs IRC @fullstack suggested to run "strace -f /usr/local/bin/node" – The result of this is : https://gist.github.com/aneek/0ef3d9fe1a6521fdee6a
EDIT#2
As per @fullstack's suggestion instead of using "python2.7 configure && make && make install" I tried to install with "./configure && make && make install". But error occurred (That's why I used Python2.7)
Please suggest. I am stuck very bad 🙁
Best Answer
Install with EPEL
https://github.com/joyent/node/wiki/installing-node.js-via-package-manager#enterprise-linux-and-fedora