-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Using node-oracledb on OS X without having DYLD_LIBRARY_PATH set? #149
Comments
Are there no OS X users out there?! |
I'm on OS X. Sorry, I've been busy getting started with a new project this week, but I'll try this out over the weekend. |
I had been having a really hard time getting this node module running on OS X. I'm running the OS X 10.11 el capitan beta and I read somewhere (unconfirmed) that you cannot create DYLD variables or something. This script worked great to get everything set up and working for me. |
@wesleyeff can you describe your problems? Did you try the steps in my blog post https://blogs.oracle.com/opal/entry/installing_node_oracledb_on_os ? From what I read about 10.11 you can still use DYLD variables but there are restrictions on passing them to subshells, which mainly affects shell scripts, see rust-lang/cargo#1816 |
I was originally using the instructions here, https://github.com/oracle/node-oracledb but I couldn't get the oracle instant client libraries working. As soon as I found your blog post and tried your script it worked perfectly for me. I definitely think it should be added to the documentation. |
@wesleyeff What bit wasn't working? The build? The runtime? How were you invoking Node? What environment did you have set? |
@cjbj On this page, https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instosx where you set these environment variables: DYLD_LIBRARY_PATH, OCI_LIB_DIR and OCI_INC_DIR is where I was having problems. For example when I would do this: Sorry I'm not very good at describing this. Let me know if you have any other questions. |
@wesleyeff I totally wouldn't expect environment variables to remain set if you reopen a terminal. You would need to set them in whatever shell startup script you use, e.g. $HOME/.bash_profile. |
@cjbj Ok, I added the DYLD_LIBRARY_PATH to my .bash_profile and it is now working without using the osxinstall.sh script on 10.11. |
@wesleyeff thanks for the testing. I'll make a note to improve the doc. |
Just did this installation today, its very far from a simple 'npm install'. Understandable that there are licensing issues, but its a pain none the less.
|
@akiellor thanks for the feedback. The first million times are the worst. |
Was this closed with a resolution? |
@akiellor the base question was mine about whether to augment the doc, then the thread got hijacked a bit. Feel free to open a new issue if you have a question. |
Why is this issue closed? But in the long term For those that need to disable SIP on El Capitan use the |
Apologies for taking so long. Between work and planning a wedding, time has been sparse! The good news: I was able to get it working. 👍 The bad news: this is still a pretty crummy setup. I hate to say this, but with the new El Capitan update, the setup has gone from, “crummy but workable" to "eee gads, yuck." Sorry, I'm trying to be nice but honest! 😁 Besides the additional frustration of saying, "hey, go download a script from a blog post, edit it and run it" as part of a project setup. I see two problems:
But flipping back to good news, I'm optimistic about the progress with #18! Please please please please prioritize this! 😁 |
Tried out the script it works on my installation of El Capitan. Besides pulling out the
to:
Since just using sed messed up the |
Further thinking on the topic why should the oracledb client depend on the LD_LIBRARY_PATH at all. Currently it has been removed on OS X, and it has been recommended to be avoided on Linux for a while. Should I set LD_LIBRARY_PATH I guess it's due to that the instantclient is already precompiled. Which would require to compile it as part of the node oracledb client, is it possible? Otherwise one would require to have postinstall step for OS X only. Any ideas? As it is now is not the best solution. Having so many system dependent steps and quirks just makes it troublesome for people to install this client at all. If it's possible to reconcile the system dependent steps and compile the instantclient as part of the installation of the node oracledb client it should be done, in my opinion. |
I made document, which doesn't use the script. |
@cristobal thanks for the VER fix. @kubo thanks for jumping in. I like the comment on Avoiding LD_LIBRARY_PATH: |
Hi I'm having the following error when tried to run with El Capitan osx dyld: lazy symbol binding failed: Symbol not found: _OCIClientVersion Could you please help me? Regards |
@luizlugo please start a new issue. |
For OS X El Capitan, what about these steps? Anyone see any (new!) issues: Get Oracle Instant Clientcd /tmp As root, copy the OCI libraries to /usr/local/libcd /tmp/instantclient_11_2 Install node-oracledb as a normal userexport OCI_LIB_DIR=/usr/local/lib Clean uprm -rf /tmp/instantclient_12_1 |
@cjbj The following steps are also okay. Get Oracle Instant Clientcd /tmp Install node-oracledb as a normal userexport OCI_LIB_DIR=/tmp/instantclient_11_2 As root, copy the OCI libraries to /usr/local/libcd /tmp/instantclient_11_2 Clean uprm -rf /tmp/instantclient_12_1 |
@kubo, since node-oracledb's installer defaults to use /opt/oracle/instantclient the following is easier. It also uses sym links in /usr/local/lib which is easier to maintain & cleanup as needed, and keeps the SDK for future node-oracledb upgrades. Install Instant Client 11.2 as root:
Clean up if desired:
Install node-oracle (which defaults to use /opt/oracle/instantclient):[as a normal user]
|
I've documented these steps in INSTALL. (Other work is ongoing on how Instant Client itself is built) |
@cjbj To not require
|
@raymondfeng Magic. Though OCI_INC_DIR & OCI_LIB_DIR will need to be set during installation since the node-oracledb default location /opt/oracle/instantclient isn't being used. Do you have a reference on SIP and ~/lib? (For future readers, this is regarding Instant Client 11.2. There should be more flexibility with Instant Client 12.1 when it is released on OS X) |
|
@raymondfeng useful but last updated in 2012, pre-SIP. |
The key is that SIP is happy with |
@raymondfeng I also tested it, so it must be true (!) It's worth adding it to INSTALL. |
Instant Client 12.1 for OS X is now available from: http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html Updated installation instructions are at: http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html#ic_osx_inst |
74 error oracledb ERR! NJS-067: a pre-built node-oracledb binary was not found for darwin arm64 |
@yogithesymbian please open new issues for new problems. But search the repo first: #1349 |
Have any OS X users played with the node-oracledb build or with
install_name_tool
and made it so that DYLD_LIBRARY_PATH isn't needed? I did a little initial investigation, see https://blogs.oracle.com/opal/entry/installing_node_oracledb_on_osWould this seem reasonable to 'officially' document?
The text was updated successfully, but these errors were encountered: