我正在使用具有High Sierra的Apple Mac。
我需要为Node.JS安装JDBC。但是,它给出以下错误。请建议如何做到这一点。
谢谢。
apples-imac:pConfMan parthamajumdar$ sudo npm install --save jdbc
> java@0.9.1 install /Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan/node_modules/java
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /Users/parthamajumdar/anaconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:289:12)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at maybeClose (internal/child_process.js:962:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:381:11)
gyp ERR! stack at Socket.emit (events.js:182:13)
gyp ERR! stack at Pipe._handle.close (net.js:606:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan/node_modules/java
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! java@0.9.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the java@0.9.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/parthamajumdar/.npm/_logs/2018-09-20T11_09_00_132Z-debug.log
答案 0 :(得分:1)
我在计算机上安装了Python 2.7和Java8,现在问题已解决。感谢您的帮助。