Reputation: 406
I follow all the instructions to install node oracle on my computer. When I run sudo npm install oracle
(or without sudo) I get:
../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! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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
I do however have the occi.h file. I have scoured online for hours to no avail. Any ideas?
Upvotes: 3
Views: 1651
Reputation: 3922
I hit the same error and I saw that I forgot to install Instant Client Package - SDK
which has additional header files and an example makefile for developing Oracle applications with Instant Client. When I put the sdk
folder to the $OCI_HOME (that is the path to the instantclient_VV_v folder) , it was resolved.
Upvotes: 0
Reputation: 4349
I posted a bounty since I hit this issue but then I was able to resolve it in a few steps. You need to export the variables, then do a few more items. I found detailed install instructions for the oracle driver here - https://github.com/joeferner/node-oracle/blob/master/INSTALL.md
Just follow those step by step and you should be good.
Upvotes: 2