Re: cx_oracle and EL Capitan?

Kubo Takehiro <[email protected]> Tue, 13 Oct 2015 12:33:57 +0900
Newsgroups gmane.comp.python.db.cx-oracle
Message-ID <CAAkVAoS+NpT19t2i9su_ph9LfQ7T4eRTz5PQ=Omt3XkB1P7QKg@mail.gmail.com>
On 12/10/2015 10:58 pm, Dominic Giles wrote:
> After upgrading to El Capitan. cx_oracle now appears to have broken.
>
> prior to upgrading my environment worked fine. Now I get the message indicating problems with DYLD_LIBRARY_PATH.
>
> python WaitTime.py
> Traceback (most recent call last):
>    File "WaitTime.py", line 5, in <module>
>      import cx_Oracle
> ImportError: dlopen(/Library/Python/2.7/site-packages/cx_Oracle.so, 2): Library not loaded: /ade/b/2649109290/oracle/rdbms/lib/libclntsh.dylib.11.1
>    Referenced from: /Library/Python/2.7/site-packages/cx_Oracle.so
>    Reason: image not found

If libclntsh.dylib.11.1 is in /opt/oracle/instantclient_11_2, run the
following command.

   curl -O https://raw.githubusercontent.com/kubo/fix_oralib_osx/master/fix_oralib.rb
   ruby fix_oralib.rb --ic_dir /opt/oracle/instantclient_11_2
/Library/Python/2.7/site-packages/cx_Oracle.so

This changs the install name in cx_Oracle.so from
/ade/b/2649109290/oracle/rdbms/lib/libclntsh.dylib.11.1
to @rpath/libclntsh.dylib.11.1 and adds /opt/oracle/instantclient_11_2
as rpath to cx_Oracle.so.

------------------------------------------------------------------------------