strongloop / strong-oracle

Deprecated: Node.js Driver for Oracle databases (Use https://github.com/oracle/node-oracledb instead)
Other
45 stars 18 forks source link

libocci.so error after successful build #15

Closed medokin closed 9 years ago

medokin commented 9 years ago

Hi,

I get this error when i try to run my application:

/home/superuser/plusnet-node-runner/node_modules/strong-oracle/lib/oracle.js:10
  throw err;
      ^
Error: libocci.so.11.1: cannot open shared object file: No such file or directory
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/superuser/plusnet-node-runner/node_modules/strong-oracle/lib/oracle.js:4:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

The build was successful:

make: Gehe in Verzeichnis '/home/superuser/plusnet-node-runner/node_modules/strong-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/outParam.o
  CXX(target) Release/obj.target/oracle_bindings/src/reader.o
  CXX(target) Release/obj.target/oracle_bindings/src/statement.o
  SOLINK_MODULE(target) Release/obj.target/oracle_bindings.node
  SOLINK_MODULE(target) Release/obj.target/oracle_bindings.node: Finished
  COPY Release/oracle_bindings.node

Linux Mint 64bit Node: v0.10.32 NPM: 1.4.28

bnoordhuis commented 9 years ago

Does it work when you start node with env LD_LIBRARY_PATH=/a/b/c node app.js, where /a/b/c is the directory containing libocci.so.11.1? Can you post the output of ldd node_modules/strong-oracle/build/Release/oracle_bindings.node?

medokin commented 9 years ago

It works when I start it with with the libary path.

Here the output you asked for.

$ ldd node_modules/strong-oracle/build/Release/oracle_bindings.node
    linux-vdso.so.1 =>  (0x00007fff232e5000)
    libocci.so.11.1 => not found
    libclntsh.so.11.1 => not found
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0177612000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f01773fc000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0177036000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0176d2f000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f0177b59000)

How can the it be build when the libs are not found?

bnoordhuis commented 9 years ago

Right, the directory containing libocci.so.11.1 is not in the set of default linker paths. There is a note in the README explaining how to add it to the ld.so cache but you can keep using the LD_LIBRARY_PATH workaround if you prefer.

medokin commented 9 years ago

I see now that there is a typo in my ld.so.conf.d file. It works now after replacing ~ with an absolute path.

Sorry, my mistake. Thanks for your time!

RESOLVED:

bnoordhuis commented 9 years ago

Nice, cheers. :-)