尝试在centos 6计算机上安装node-glfw时出现以下错误。 我已经将PKG_CONFIG_PATH设置为/usr/local/lib/pkgconfig/glfw3.pc
以下是错误:
npm http GET https://registry.npmjs.org/node-glfw
npm http 304 https://registry.npmjs.org/node-glfw
npm WARN engine node-glfw@0.3.1: wanted: {"node":"0.6.5-0.11.10"} (current: >{"node":"v0.10.33","npm":"1.3.6"})
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
node-glfw@0.3.1 install /home/ingole/node_modules/node-glfw
node-gyp rebuild
Package glfw3 was not found in the pkg-config search path.
Perhaps you should add the directory containing glfw3.pc' to the PKG_CONFIG_PATH environment variable No package 'glfw3' found Traceback (most recent call last): File "/usr/bin/gyp", line 18, in <module> sys.exit(gyp.main(sys.argv[1:])) File "/usr/lib/python2.6/site-packages/gyp/__init__.py", line 462, in main options.circular_check) File "/usr/lib/python2.6/site-packages/gyp/__init__.py", line 100, in Load depth, generator_input_info, check, circular_check) File "/usr/lib/python2.6/site-packages/gyp/input.py", line 2255, in Load depth, check) File "/usr/lib/python2.6/site-packages/gyp/input.py", line 388, in LoadTargetBuildFile build_file_path) File "/usr/lib/python2.6/site-packages/gyp/input.py", line 1011, in ProcessVariablesAndConditionsInDict build_file) File "/usr/lib/python2.6/site-packages/gyp/input.py", line 1026, in ProcessVariablesAndConditionsInList ProcessVariablesAndConditionsInDict(item, is_late, variables, build_file) File "/usr/lib/python2.6/site-packages/gyp/input.py", line 985, in ProcessVariablesAndConditionsInDict ProcessConditionsInDict(the_dict, is_late, variables, build_file) File "/usr/lib/python2.6/site-packages/gyp/input.py", line 862, in ProcessConditionsInDict variables, build_file) File "/usr/lib/python2.6/site-packages/gyp/input.py", line 1011, in ProcessVariablesAndConditionsInDict build_file) File "/usr/lib/python2.6/site-packages/gyp/input.py", line 1030, in ProcessVariablesAndConditionsInList expanded = ExpandVariables(item, is_late, variables, build_file) File "/usr/lib/python2.6/site-packages/gyp/input.py", line 697, in ExpandVariables (contents, p.returncode)) Exception: Call to 'pkg-config --libs glfw3 glew' returned exit status 1. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error:gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:428:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 2.6.32-431.el6.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ingole/node_modules/node-glfw
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0
答案 0 :(得分:0)
如果您查看node-glfw的github上的问题,则存在一个悬而未决的问题
答案 1 :(得分:0)
PKG_CONFIG_PATH应该是这样的:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
而不是
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/glfw3.pc
在此之后,
npm install node-glfw
正在为我工作