ClearOS‎ > ‎

NodeJS

Just another reason I like zentyal better than ClearOS: Ubuntu vs CentOS / ClearCore.

The packages available to ubuntu (largely thanks to debian) are the best and most comprehensive of any distribution I've ever run.  This means less source compiling, and less dependency reconciliation.  Point in case: installing NodeJS on ClearOS is a lot harder than it should be all because Clear's repositories host an outdated version of python, which makes the configure process for NodeJS fail with syntax errors.

To get around this, we must do the following:
1) Install an updated version of python by building from source.
cd /usr/src
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar zxf Python-2.7.3.tgz
cd Python-2.7.3
./configure
make
make altinstall

make altinstall above puts python in /usr/local (rather than /usr), which should avoid conflict with the existing version.

2) Fix the NodeJS configure script.
  I tried this: export PYTHON=/usr/local/bin/python2.7
....but it failed.  I didn't care to investigate why.  Just change the shebang line (the first line) in the configure script to #!/usr/local/bin/python2.7

3) NOW you can configure, make && make install NodeJS.

Comments