user1558945
user1558945

Reputation: 31

npm install oracle fail

I've got my environment variables set:

export ORACLE_HOME=/usr/lib/oracle/12.1/client64
export LD_LIBRARY_PATH=$ORACLE_HOME
export DYLD_LIBRARY_PATH=$ORACLE_HOME

I've also set a soft link in the ORACLE_HOME because includes are here:

/usr/include/oracle/12.1/client64/

So:

export OCI_INCLUDE_DIR=$ORACLE_HOME/include/

But npm install oracle still fails - I'm sure this is something to do with how my oracle install set up is configured but no idea how to fix it.

Here's my error:

npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
\
> [email protected] install /home/cdcoulon/Desktop/proto/banner_test/node_modules/oracle
> node-gyp rebuild

make: Entering directory `/home/cdcoulon/Desktop/proto/banner_test/node_modules/oracle/build'
  CXX(target) Release/obj.target/oracle_bindings/src/connection.o
  CXX(target) Release/obj.target/oracle_bindings/src/oracle_bindings.o
  CXX(target) Release/obj.target/oracle_bindings/src/executeBaton.o
  CXX(target) Release/obj.target/oracle_bindings/src/reader.o
  CXX(target) Release/obj.target/oracle_bindings/src/statement.o
  CXX(target) Release/obj.target/oracle_bindings/src/outParam.o
  SOLINK_MODULE(target) Release/obj.target/oracle_bindings.node
/usr/bin/ld: cannot find -locci
/usr/bin/ld: cannot find -lclntsh
/usr/bin/ld: cannot find -lnnz12
collect2: error: ld returned 1 exit status
make: *** [Release/obj.target/oracle_bindings.node] Error 1
make: Leaving directory `/home/cdcoulon/Desktop/proto/banner_test/node_modules/oracle/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/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:820:12)
gyp ERR! System Linux 3.13.0-49-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/cdcoulon/Desktop/proto/banner_test/node_modules/oracle
gyp ERR! node -v v0.10.38
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 Linux 3.13.0-49-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "oracle"
npm ERR! cwd /home/cdcoulon/Desktop/proto/banner_test
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

Upvotes: 1

Views: 620

Answers (1)

Christopher Jones
Christopher Jones

Reputation: 10526

You are using Joe Ferner's 'oracle' driver. If the functionality you need is available in the newer node-oracledb driver, you should find installation easier. You have Instant Client RPMs, so you won't need to set any environment variables for node-oracledb: just use 'npm install oracledb' See https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instrpm

Upvotes: 1

Related Questions