【发布时间】:2014-12-03 15:00:22
【问题描述】:
我按照所有说明在我的计算机上安装节点 oracle。当我运行 sudo npm install oracle(或不使用 sudo)时,我得到:
../src/connection.h:11:10: fatal error: 'occi.h' file not found
#include <occi.h>
^
1 error generated.
make: *** [Release/obj.target/oracle_bindings/src/connection.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
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 Darwin 14.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/alexanderkornhauser/node_modules/oracle
gyp ERR! node -v v0.10.33
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 Darwin 14.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "oracle"
npm ERR! cwd /Users/alexanderkornhauser/Desktop
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
我确实有 occi.h 文件。 我已经在网上搜索了几个小时无济于事。有什么想法吗?
【问题讨论】:
-
您是否按照安装指南进行操作? github.com/joeferner/node-oracle#basic-installation
-
我一个字一个字地跟着它
-
当您在 shell 中键入
$ printenv和$ sudo printenv时,是否表明OCI_INCLUDE_DIR和OCI_LIB_DIR已设置且正确? -
我应该寻找什么?我收到很多文本...唯一的外壳是:SHELL=/bin/bash
-
首先,你不应该真的需要使用
sudo。实际上,您可能会以这种方式搞砸,因为某些文件会以错误的权限创建(并且您会遇到更多错误)。我建议更改整个目录的所有权并在此之后停止使用sudo(不需要它)。要更改当前目录的所有权(递归),请运行sudo chown -R <username> .并在您的系统用户名中使用 sub。其次...