Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library not loaded? #44

Closed
MikeFielden opened this issue Aug 5, 2015 · 15 comments
Closed

Library not loaded? #44

MikeFielden opened this issue Aug 5, 2015 · 15 comments

Comments

@MikeFielden
Copy link

I have followed the instructions but cannot seem to get this working. The error I get is:

Error: dlopen(LOCAL_MODULE_PATH/node_modules/strong-oracle/build/Release/oracle_bindings.node, 1): Library not loaded: /ade/b/3071542110/oracle/rdbms/lib/libocci.dylib.11.1 Referenced from: LOCAL_MODULE_PATH/node_modules/strong-oracle/build/Release/oracle_bindings.node Reason: image not found 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> (LOCAL_MODULE_PATH/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)

The relevant part, i think is, 1): Library not loaded: /ade/b/3071542110/oracle/rdbms/lib/libocci.dylib.11.1

The path to the instantclient is /opt/oracle/instantclient/

I have set the env to
{ OCI_INCLUDE_DIR: '/opt/oracle/instantclient/sdk/include', OCI_HOME: '/opt/oracle/instantclient/', DYLD_LIBRARY_PATH: '/opt/oracle/instantclient/', OCI_LIB_DIR: '/opt/oracle/instantclient/', }

screen shot 2015-08-05 at 9 03 46 am

Everything looks right but I cannot seem to get past that error.

@kathan
Copy link
Contributor

kathan commented Aug 5, 2015

Do you have a folder /ade/b/3071542110/oracle/rdbms containing a symbolic link called lib that points to /opt/oracle/instantclient/? If not, that could be what you're missing.

@MikeFielden
Copy link
Author

Yeah I obviously dont. Nor did I tell it to look there :) How/What/Where is it supposed to be looking and how do I change that?

@kathan
Copy link
Contributor

kathan commented Aug 5, 2015

It's been a while since I've needed to do this but I believe this should help you:

This will create the directory sudo mkdir -p /ade/b/3071542110/oracle/rdbms
Move to the directory you just created - cd /ade/b/3071542110/oracle/rdbms
Make a link to the instant client directory - sudo ln -s /opt/oracle/instantclient lib

FYI, you may encounter another similar issue regarding LDAP.

@MikeFielden
Copy link
Author

It looks like that will work however it is basically going file for file saying Library Not Loaded.... So I think this isnt a great fix. Any idea why its looking in that folder in the first place?

@kathan
Copy link
Contributor

kathan commented Aug 5, 2015

Are you getting another error? AFAIK, that path is hard coded into the Oracle instant client.

@MikeFielden
Copy link
Author

Error now is: 1): Library not loaded: /ade/b/3071542110/oracle/rdbms/lib/libclntsh.dylib.11.1
and when I do the same thing on that one I get the next error: 1): Library not loaded: /ade/dosulliv_ldapmac/oracle/ldap/lib/libnnz11.dylib and so on...

My symlink format is sudo ln -s /opt/oracle/instantclient/libclntsh.dylib.11.1 /ade/b/3071542110/oracle/rdbms/lib

I mean that is right but is there a faster way?

@kathan
Copy link
Contributor

kathan commented Aug 5, 2015

Sorry, that might be on me. I looked at the script I used to do my setup and it's slightly different. My script looks like this:
sudo mkdir -p /ade/b/3071542110/oracle/rdbms/lib/
cd /ade/b/3071542110/oracle/rdbms/lib/
sudo ln -s /opt/oracle/instantclient/libclntsh.dylib.11.1 libclntsh.dylib.11.1

@raymondfeng
Copy link
Member

Did you strictly follow the instructions at https://github.com/strongloop/strong-oracle?

Please note /ade/b/3071542110/oracle/rdbms is an internal name used in the Oracle dynamic lib. It's not a physical dir on the file system. Do not try to fiddle around it.

@MikeFielden
Copy link
Author

Yes @raymondfeng I have followed the instructions several times. I always get to the same dlopen issue. Believe me I dont want to fiddle around with anything. :) Id just like for it to work. So whatever help you can provide would be much appreciated.

@raymondfeng
Copy link
Member

The key is that you have to make sure DYLD_LIBRARY_PATH is effective in your shell. For example, you can export DYLD_LIBRARY_PATH in ~/.bash_profile as follows:

export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/opt/oracle/instantclient/"

And run source ~/.bash_profile or logout and login again.

@MikeFielden
Copy link
Author

^ that.

@ganeshchand
Copy link

Is this resolved? I am stuck with this error.

@ibre5041
Copy link

See this solution: https://github.com/kubo/fix_oralib_osx

@cjbj
Copy link

cjbj commented Feb 28, 2016

Also check the solution @raymondfeng found so you don't need to modify the libraries oracle/node-oracledb#149 (comment)

@MikeFielden
Copy link
Author

@ganeshchand I find that just running with the env mapped to the path of the DYLD library is the route of least friction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants