node-gyp configure 出错
发布于 12 年前 作者 peiweippww 15553 次浏览 最后一次编辑是 8 年前
gyp info it worked if it ends with ok
gyp info using node-gyp[@0](/user/0).9.6
gyp info using node[@0](/user/0).8.21 | linux | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/data/work/peiwei/russia_block/game-server/app/models/addon/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.node-gyp/0.8.21/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/0.8.21',
gyp info spawn args   '-Dmodule_root_dir=/data/work/peiwei/russia_block/game-server/app/models/addon',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
Traceback (most recent call last):
  File "/usr/local/lib/node_modules/node-gyp/gyp/gyp", line 18, in <module>
    sys.exit(gyp.main(sys.argv[1:]))
  File "/usr/local/lib/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 523, in main
    return gyp_main(args)
  File "/usr/local/lib/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 499, in gyp_main
    options.circular_check)
  File "/usr/local/lib/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 129, in Load
    params['parallel'])
  File "/usr/local/lib/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2556, in Load
    variables, includes, depth, check, True)
  File "/usr/local/lib/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 365, in LoadTargetBuildFile
    includes, True, check)
  File "/usr/local/lib/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 223, in LoadOneBuildFile
    None)
  File "binding.gyp", line 1
    {
     ^
SyntaxError: invalid syntax
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:415:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Linux 2.6.32-5-amd64
gyp ERR! command "node" "/usr/local/bin/node-gyp" "configure"
gyp ERR! cwd /data/work/peiwei/russia_block/game-server/app/models/addon
gyp ERR! node -v v0.8.21
gyp ERR! node-gyp -v v0.9.6
gyp ERR! not ok
8 回复

python 2.7装了没

装的是2.6.6

不要有中文试试

那个是粘贴的代码,多粘贴了点聊天记录

@peiweippww 你是在编写addons node-gyp configure报错吗?如果是检查下binding.gyp是否正确。

请问这个问题您解决了吗?我也出现了这个问题,向您求教啊

@peiweippww 你这是在编译node么?

binding.gyp格式有问题

回到顶部