我试图在Centos 5.5上安装Node.js,最新的更新删除了yum。
因此,当我试图运行make时,我收到以下错误。任何想法为什么或正在发生什么?
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/usr/local/src/node-v0.12.0/out'
LD_LIBRARY_PATH=/usr/local/src/node-v0.12.0/out/Release/lib.host:/usr/local/src/node-v0.12.0/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/tools/gyp; mkdir -p /usr/local/src/node-v0.12.0/out/Release/obj/gen; python ../../tools/js2c.py "/usr/local/src/node-v0.12.0/out/Release/obj/gen/libraries.cc" CORE off ../../src/runtime.js ../../src/v8natives.js ../../src/symbol.js ../../src/array.js ../../src/string.js ../../src/uri.js ../../third_party/fdlibm/fdlibm.js ../../src/math.js ../../src/messages.js ../../src/apinatives.js ../../src/debug-debugger.js ../../src/mirror-debugger.js ../../src/liveedit-debugger.js ../../src/date.js ../../src/json.js ../../src/regexp.js ../../src/arraybuffer.js ../../src/typedarray.js ../../src/weak_collection.js ../../src/promise.js ../../src/object-observe.js ../../src/collection.js ../../src/collection-iterator.js ../../src/macros.py ../../src/array-iterator.js ../../src/string-iterator.js
File "../../tools/js2c.py", line 409
except Error as e:
^
SyntaxError: invalid syntax
make[1]: *** [/usr/local/src/node-v0.12.0/out/Release/obj/gen/libraries.cc] Error 1
make[1]: Leaving directory `/usr/local/src/node-v0.12.0/out'
make: *** [node] Error 2
答案 0 :(得分:5)
我在RHEL5上遇到了同样的问题。我找到了解决办法,直到上游修复。编辑deps / v8 / tools / gyp / v8.gyp并将'python'替换为'python2.7'以强制编译阶段使用正确版本的python。
提交了一个上游错误