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

Ubuntu deployment error on run: invalid ELF header #39

Closed CollinEstes closed 9 years ago

CollinEstes commented 9 years ago

Sorry to keep pinging you all, but I have my Node API up and running locally on OSX (thanks to all the help), and now I'm trying to stand it up on my AWS instance. (last hurdle for me)

I'm working behind an enterprise proxy that is giving me trouble with NPM installing Strong-Oracle (working on this with my network admins) so I just zipped up my project w/ it's dependencies (including strong-oracle installed on OSX) and moved it over to my server.

I have the instant client libraries for Instant Client for Linux x86-64.

My server's architecture is:

generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

I set up the ENV variables like the documentation, created the symlinks, etc... Everything looks good from what I see.

When I run my application I get the following error:

/home/cjestes/src/sarah_web_api/node_modules/mdt_oracle/node_modules/strong-oracle/lib/oracle.js:17
    throw err;
          ^
Error: /home/cjestes/src/sarah_web_api/node_modules/mdt_oracle/node_modules/strong-oracle/build/Release/oracle_bindings.node: invalid ELF header
    at Error (native)
    at Module.load (module.js:351:32)
    at Function.Module._load (module.js:306:12)
    at Module.require (module.js:361:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/cjestes/src/sarah_web_api/node_modules/mdt_oracle/node_modules/strong-oracle/lib/oracle.js:11:14)
    at Module._compile (module.js:426:26)
    at Object.Module._extensions..js (module.js:444:10)
    at Module.load (module.js:351:32)
    at Function.Module._load (module.js:306:12)

It throws that on boot of my express server.

CollinEstes commented 9 years ago

Just found a similar case with bcrypt that said you need to install it on the OS, so is my problem that I am deploying strong-oracle dependency from OSX and not compiling it on Linux?

bnoordhuis commented 9 years ago

You need to recompile (npm rebuild) your dependencies, copying native add-ons from one platform to another won't work (and may not even work on the same platform.)

CollinEstes commented 9 years ago

Ok thanks.