在 nodejs 上安装 oracle 时出现错误。我正在按照本网站 ( https://github.com/joeferner/node-oracle ) 中编写的步骤进行操作,最后,“npm install oracle”不起作用。
我在名为“Project”的同一目录中下载了python2.7.8、visual studio express 2012 for desktop和instantclient(basic和sdk),并在我的笔记本电脑中设置了环境变量。
这是发生的错误。
C:\dev\Project>npm install oracle
npm WARN package.json Express-web-app@1.0.0 No description
npm WARN package.json Express-web-app@1.0.0 No repository field
npm WARN package.json fs@0.0.2 fs is also the name of a node core module.
npm WARN package.json fs@0.0.2 fs No description
npm WARN package.json fs@0.0.2 fs No repository field
-
> oracle@0.3.7 install C:\dev\Project\node_modules\oracle
> node-gyp rebuild
C:\dev\Project\node_modules\oracle>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python2.7.8", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:103:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:64:11
enter code here
gyp ERR! stack at Object.oncomplete (evalmachine.<anonymous>:107:15)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\dev\Project\node_modules\oracle
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! oracle@0.3.7 install: 'node-gyp rebuild'
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the oracle@0.3.7 install script.
npm ERR! This is most likely a problem with the oracle package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls oracle
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "oracle"
我不知道错误提示“找不到 python 可执行文件.....brr”的原因...