Issue building cx_Oracle - libclntsh.so.11.1 => not found

前端 未结 4 829
别那么骄傲
别那么骄傲 2020-12-29 21:42

I\'m trying to build cx_Oracle for a Python 2.7.2 and Oracle 11g installation but the built cx_Oracle.so cannot find libclntsh.so.11.1 so importing cx_Oracle in Python fails

4条回答
  •  一整个雨季
    2020-12-29 21:57

    Set the LD_RUN_PATH. ( LD_RUN_PATH is used by the linker to specify where to look for libraries only at run time.)

    Now build cx_Oracle.

    /mypath/cx_Oracle-5.1.1]$ export LD_RUN_PATH="/apps/oracle/client/11.2.0.1/home1/lib"
    /mypath/cx_Oracle-5.1.1]$ python2.7 setup.py build
    

    This will not require the setting of LD_LIBRARY_PATH while importing cx_Oracle.

提交回复
热议问题