python-cx_Oracle icon indicating copy to clipboard operation
python-cx_Oracle copied to clipboard

Error: DPI-1047 using Instant Client on macOS Catalina 10.15

Open nchillal opened this issue 7 years ago • 63 comments

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?

nchillal avatar Aug 01 '19 17:08 nchillal

SOLUTION: I had this same problem after upgrading to Catalina. The network admin at my company mentioned it was the Apple malware gatekeeper protection system in Catalina. He suggested trying following command:

sudo xattr -d com.apple.quarantine /path/to/library

I had to run this for all of the oracle client libraries, so my commands looked like this sudo xattr -d com.apple.quarantine /usr/local/lib/libclntsh.dylib.19.1 sudo xattr -d com.apple.quarantine /usr/local/lib/libnnz19.dylib sudo xattr -d com.apple.quarantine /usr/local/lib/libclntshcore.dylib.19.1 sudo xattr -d com.apple.quarantine /usr/local/lib/libociicus.dylib

Hope this helps!

rushramia avatar Sep 22 '20 13:09 rushramia

Same problem with BigSur... I think Oracle (@cjbj) here should do some work to make the library trustable by Apple OS... Screenshot 2021-01-05 at 11 41 30 Screenshot 2021-01-05 at 11 41 44

Allow anyway still not working...

gpietro avatar Jan 05 '21 10:01 gpietro

@gpietro Instant Client 19.8 DMGs are notarized so you shouldn't see a problem.

https://blogs.oracle.com/opal/notarized-macos-oracle-instant-client-packages-make-installation-easier

https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html#install-oracle-instant-client

cjbj avatar Jan 05 '21 22:01 cjbj