简体   繁体   中英

how to install node.js in linux server using putty

-bash-3.2$ ./configure --prefix=$HOME
   File "./configure", line 287
     o['default_configuration'] = 'Debug' if options.debug else 'Release'

SyntaxError: invalid syntax .

How do I fix this error?

The error you're receiving is the result of using an older version of Python. To build Node.js, you must use version 2.6 or 2.7 of Python.

To fix your problem, update Python to a supported version. Also make sure that your PATH variable points to the correct Python you want to use, as installing a package might not change where the variable points to.

To check your version of Python, use this command:

python -V

do not enter -bash-3.2$ at the beginning. Just do

./configure --prefix=$HOME File "./configure", line 287 o['default_configuration'] = 'Debug' if options.debug else 'Release'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM