Error: DPI-1047 using Instant Client on macOS Catalina 10.15
I recently upgrade my mac to Mac OS Catalina Beta version. After that cx-Oracle is not working. Fails with error message below.
cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "dlopen(libclntsh.dylib, 1): image not found". See https://oracle.github.io/odpi/doc/installation.html#macos for help
Version Python 3.7.4 cx-Oracle 7.2.0
This looks to me due to Apple dropping support of 32-bit apps. Can you confirm?
@cjbj - this is a nightmare right now. Do you want me to raise a separate issue?
I ran into the same issue with the 19.1 client, but downgrading to an older client (I tried 12.1) worked after trusting each lib in System Preferences.
@kindjacket I'll just reopen this issue. You should reach out to your Oracle sales contacts to let them know too.
yeah the app needs to notarized. Instructions here - https://developer.apple.com/documentation/xcode/notarizing_your_app_before_distribution/customizing_the_notarization_workflow?language=objc#3087734
I've found a workaround (based on this answer here - https://github.com/Jackett/Jackett/issues/5589#issuecomment-508560798). It's not pretty.. You have to manually set the quarantine flag the dylib
First you need to run this -
xattr -p com.apple.quarantine libclntsh.dylib
That should return something like this -
0081;5d1bec70;Safari;0622FF31-4499-4EBA-954A-EDC879E4010A
You then need to run the below code. With the return string from above but replacing 0081 with 00c1
xattr -w com.apple.quarantine "00c1;5d1bec70;Safari;0622FF31-4499-4EBA-954A-EDC879E4010A" *.dylib
The real fix, however, is Oracle notarizing the instant client.
A workaround I found when prompted with "...cannot be opened opened because the developer cannot be verified" is to navigate to Security & Privacy -> General. There, you should see the file you were just told you cannot open listed and an "Open anyway" button. https://support.apple.com/el-gr/guide/mac-help/mh40616/mac
I had to repeat this about 4 times for 4 different files, but my oracle instant client is now working fine.
@chkeno Good info.
I'm not sure when I will be able to upgrade to Catalina to test it all myself. There are other (3rd party) tools I need that also aren't yet supported on it.
I had a similar with Catalina, trying to delete the oracle libs, but resolved the issue running the following line in terminal, sudo spctl --master-disable. Apparently Oracle is not classified as an approved developer and MacOS gets upset when you try to run a py script against the libs. Hope this helps.
I've found a workaround (based on this answer here - Jackett/Jackett#5589 (comment)). It's not pretty.. You have to manually set the quarantine flag the dylib
First you need to run this -
xattr -p com.apple.quarantine libclntsh.dylibThat should return something like this -
0081;5d1bec70;Safari;0622FF31-4499-4EBA-954A-EDC879E4010AYou then need to run the below code. With the return string from above but replacing 0081 with 00c1
xattr -w com.apple.quarantine "00c1;5d1bec70;Safari;0622FF31-4499-4EBA-954A-EDC879E4010A" *.dylibThe real fix, however, is Oracle notarizing the instant client.
I had also to do
xattr -w com.apple.quarantine "00c1;5da44079;Opera;B38C0F6F-252F-4CC7-8A2D-236BAD20C035" *.dylib.*
And now everything works perfectly. Thx.
Thanks for sharing.
A workaround I found when prompted with "...cannot be opened opened because the developer cannot be verified" is to navigate to Security & Privacy -> General. There, you should see the file you were just told you cannot open listed and an "Open anyway" button. https://support.apple.com/el-gr/guide/mac-help/mh40616/mac
I had to repeat this about 4 times for 4 different files, but my oracle instant client is now working fine.
This was actually a quick easy fix for me. Tried several times (4 or 5 times) and then it is working fine now.
I forced mac to "open the files" in iTerm, it asked for confirmation for opening the files. after saying yes to all the files it worked
I managed to solve the problem using the link: https://support.apple.com/el-gr/guide/mac-help/mh40616/mac
A workaround I found when prompted with "...cannot be opened opened because the developer cannot be verified" is to navigate to Security & Privacy -> General. There, you should see the file you were just told you cannot open listed and an "Open anyway" button. https://support.apple.com/el-gr/guide/mac-help/mh40616/mac I had to repeat this about 4 times for 4 different files, but my oracle instant client is now working fine.
This was actually a quick easy fix for me. Tried several times (4 or 5 times) and then it is working fine now.
This worked for me too. Had to retry severally but it finally worked
xattr: libclntsh.dylib: No such xattr: com.apple.quarantine
@taoruifu is that a statement or a question?
I have been disable sip in my macos catalina. Its worked for me.
I would do it this way:
To test:
ls lib*.dylib | while read f ; do n=$(xattr -p com.apple.quarantine $f | perl -pe "s/00c1/0081/"); echo xattr -w com.apple.quarantine $n $f; done
To actually perform:
ls lib*.dylib | while read f ; do n=$(xattr -p com.apple.quarantine $f | perl -pe "s/00c1/0081/"); echo "F: $f, N:$n"; xattr -w com.apple.quarantine $n $f; done
To verify: xattr -p com.apple.quarantine lib*.dylib
None of these workarounds seem to work for me on 10.15.2. Are there plans from Oracle to get the clients notarized? As of right now, I can't connect to our Oracle databases, and I'm not wild about moving everything to docker.
It's a known request, but no ETA.