Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

node.js configure file syntax error line 433

Tags:

node.js

I downloaded node.js through a link that was not joyent, and it gave me an old version of node. So I wanted to reinstall node.js with the new git://github.com/joyent/node.git. So I tried running the same clone script over and it gave a fatal error because my node folder isn't empty. So I deleted the node folder and ran it again and it cloned it.

After that I tried running the configure file and I got an error:

File "./configure", line 433
    fpu = 'vfpv3' if armv7 else 'vfpv2'
                   ^
SyntaxError: invalid syntax

I have no idea how to solve a problem? I've tried deleting the node folder and cloning the git again but same error.

Here is the code I found in the file near line 433:

armv7 = is_arch_armv7()
# CHECKME VFPv3 implies ARMv7+ but is the reverse true as well?
fpu = 'vfpv3' if armv7 else 'vfpv2'
like image 935
Tyler Avatar asked Feb 20 '13 20:02

Tyler


2 Answers

The issue was that the python script attempting to run the configure file was Python 2.4. So I installed Python 2.7 (I may have had it already), and I ran the script again using:

python2.7 configure

Then it ran correctly.

like image 53
Tyler Avatar answered Oct 22 '22 06:10

Tyler


you could use curl to install it from terminal:

$ curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
$ ./configure --jobs=1 --prefix=$HOME
$ make install

install npm:

$ curl http://npmjs.org/install.sh | sh
like image 45
hereandnow78 Avatar answered Oct 22 '22 04:10

hereandnow78