I am new to CentOS (5) as well as node.js, but I already have an old version of node.js to work on my virtual server. Now I'm trying to install a newer version, and I know that CentOS needs Python 2.4, and node requires 2.6 or later, so I installed Python 2.7 using altinstall.
But even if I set an alias for Python that points to version 2.7 before running. / configure, I still get this error:
/root/node/wscript: error: Traceback (most recent call last):
File "/root/node/tools/wafadmin/Utils.py", line 274, in load_module
exec(compile(code, file_path, 'exec'), module.__dict__)
File "/root/node/wscript", line 222
"-pre" if node_is_release == "0" else ""
^
SyntaxError: invalid syntax
What is the content. / configure:
#! /bin/sh
if [ ! -z "`echo $CC | grep ccache`" ]; then
echo "Error: V8 doesn't like cache. Please set your CC env var to 'gcc'"
echo " (ba)sh: export CC=gcc"
exit 1
fi
CUR_DIR=$PWD
WORKINGDIR=`dirname $0`
cd "$WORKINGDIR"
WORKINGDIR=`pwd`
cd "$CUR_DIR"
"${WORKINGDIR}/tools/waf-light" --jobs=1 configure $*
exit $?"
At the top of wscript is the following line: "#! / Usr / bin / env python". I also tried replacing this with something else, although I think it should work when using a Python alias
Any ideas what I need to do to get this to work?
Thank!