开发者

run "altinstall"ed python2.4 for nodejs install

i'm new to linux, please bear with me.

i'm trying to get nodejs running on my server, but because the default python version is 2.3, and nodejs requires at least 2.4 to install, i have done a "altinstall" of python2.4.

the python should be installed correctly, i can run it like this /usr/local/bin/python2.4, and when i do a version check -V, it shows Python 2.4.

okay so now i'm trying to continue with the nodejs installation, at the ./configure step. the problem is i'm not sure how to actually get the script to use the altinstall-e开发者_如何学God python2.4 binary.

i've tried

./configure --prefix=$HOME/local/node -with-python=/usr/local/bin/python2.4

./configure --with-python=/usr/local/bin/python2.4

but they don't work. i still keep getting this error

NameError: name 'set' is not defined

how do i force the script to use this "altinstall"ed python2.4?


I had a look at the sources, and a ./configure --help in the node sources said nothing about specifying your python, so you could try these slightly hackier tricks:

An alias python=/usr/local/bin/python2.4 before you execute configure could work.

It that doesn't work, a symlink in a custom ~/bin directory (or similarly named if it already exists) to the desired Python:

Try creating a bin/ directory in your $HOME path:

~$ mkdir bin     # <- in your home path

Then link the Python 2.4 executable into this directory:

~$ cd bin
~/bin$ ln -s /usr/local/bin/python2.4 python

Then at the node source tree, run configure with you ~/bin directory as the first directory in your $PATH:

[your node.js source path]$ PATH=$HOME/bin:$PATH ./configure
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜