Reputation: 521
I am trying to update the version of Node installed on a server. The version that was on there prior was 0.2.5 or something like that, so it was quite old. After some reading around I found that executing n stable
would install the latest version of Node. Upon it's supposed installation, and now when I enter node -V
, the console returned:
node: /lib/libc.so.6: version `GLIBC_2.7' not found (required by node)
So now I need to figure out how to fix that. I found a page describing installation, but the article says to make sure that you compile the files specific to the server architecture. I'm not sure how to verify mine, and the last thing I want to do is botch something installing 32bit over 64bit or vice-versa.
Does anybody have an alternate method of fixing this issue overall, or some suggestions on verifying my server architecture so I can proceed with installation?
Upvotes: 2
Views: 4714
Reputation: 521
For anybody who comes across this, apparently the issue is that I am running Centos 5.2, which comes stock with python 2.4. To be able to update successfully via npm
you need a higher version of python. Instead of going via npm
I did the following:
To create an alternate install of Python 2.7 alongside 2.4, follow the instructions here:
# cd /opt
# wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
# tar -xf Python-2.7.3.tgz
# cd Python-2.7.3
# yum install gcc
# ./configure
# make
# make altinstall
Don't install 2.7 over 2.4, because apparently that causes a bunch of features of the OS to stop working. This is the function of altinstall
.
For the installation of node itself, the wget
in those instructions is old, so follow these instructions:
# mkdir ~/sources
# cd ~/sources
# wget http://nodejs.org/dist/node-latest.tar.gz
# tar zxvf node-latest.tar.gz
# cd node-v<TAB>
# python2.7 ./configure
# make
# make install
# mv /root/sources/node-v0.10.1/out/Release /opt/node-v0.10.1
# ln -s /opt/node-v0.10.1/node /usr/bin/node
Be sure to replace the version number in the last two steps with whichever one was installed via node-latest-tar.gz. Also note that the original instructions don't include python2.7
before ./configure
, but the code will not function otherwise, assuming you followed the first part to create the altinstall
of python 2.7
Upvotes: 1