i'm trying connect python cx_Oracle with the oracle client library in Centos 8, I have followed the steps showed in https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html, the rpm packages don't work so i used the zip package and config the LD_LIBRARY_PATH to the dir where i unzip the oracle files, in this case: /opt/oracle/lib.
When i run the script i get:
cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "/opt/oracle/lib/libclntsh.so: cannot open shared object file: No such file or directory". See https://cx-oracle.readthedocs.io/en/latest/ user_guide/installation.html for help
but if i run: find /opt/oracle/lib/libclntsh.so it's works and the file is there, the env variable it's right according to the error message, but the script still not working, if anyone has any suggestions to fix this i would really appreciate it.
Update: when i set DPI_DEBUG_LEVEL=64 i get the following output:
ODPI [04293] 2021-04-10 15:51:06.109: ODPI-C 4.1.0
ODPI [04293] 2021-04-10 15:51:06.109: debugging messages initialized at level 64
ODPI [04293] 2021-04-10 15:51:06.110: Context Parameters:
ODPI [04293] 2021-04-10 15:51:06.110: Environment Variables:
ODPI [04293] 2021-04-10 15:51:06.110: ORACLE_HOME => "/opt/oracle"
ODPI [04293] 2021-04-10 15:51:06.110: LD_LIBRARY_PATH => "/opt/oracle/lib"
ODPI [04293] 2021-04-10 15:51:06.110: check module directory
ODPI [04293] 2021-04-10 15:51:06.110: module name is /usr/local/lib64/python3.6/site-packages/cx_Oracle.cpython-36m-aarch64-linux-gnu.so
ODPI [04293] 2021-04-10 15:51:06.110: load in dir /usr/local/lib64/python3.6/site-packages
ODPI [04293] 2021-04-10 15:51:06.110: load with name /usr/local/lib64/python3.6/site-packages/libclntsh.so
ODPI [04293] 2021-04-10 15:51:06.110: load by OS failure: /usr/local/lib64/python3.6/site-packages/libclntsh.so: cannot open shared object file: No such file or directory
ODPI [04293] 2021-04-10 15:51:06.110: load with OS search heuristics
ODPI [04293] 2021-04-10 15:51:06.110: load with name libclntsh.so
ODPI [04293] 2021-04-10 15:51:06.110: load by OS failure: libclntsh.so: cannot open shared object file: No such file or directory
ODPI [04293] 2021-04-10 15:51:06.110: load with name libclntsh.so.19.1
ODPI [04293] 2021-04-10 15:51:06.110: load by OS failure: libclntsh.so.19.1: cannot open shared object file: No such file or directory
ODPI [04293] 2021-04-10 15:51:06.110: load with name libclntsh.so.18.1
ODPI [04293] 2021-04-10 15:51:06.110: load by OS failure: libclntsh.so.18.1: cannot open shared object file: No such file or directory
ODPI [04293] 2021-04-10 15:51:06.110: load with name libclntsh.so.12.1
ODPI [04293] 2021-04-10 15:51:06.110: load by OS failure: libclntsh.so.12.1: cannot open shared object file: No such file or directory
ODPI [04293] 2021-04-10 15:51:06.110: load with name libclntsh.so.11.1
ODPI [04293] 2021-04-10 15:51:06.110: load by OS failure: libclntsh.so.11.1: cannot open shared object file: No such file or directory
ODPI [04293] 2021-04-10 15:51:06.110: load with name libclntsh.so.20.1
ODPI [04293] 2021-04-10 15:51:06.110: load by OS failure: libclntsh.so.20.1: cannot open shared object file: No such file or directory
ODPI [04293] 2021-04-10 15:51:06.110: load with name libclntsh.so.21.1
ODPI [04293] 2021-04-10 15:51:06.110: load by OS failure: libclntsh.so.21.1: cannot open shared object file: No such file or directory
ODPI [04293] 2021-04-10 15:51:06.110: check ORACLE_HOME
ODPI [04293] 2021-04-10 15:51:06.110: load in dir /opt/oracle/lib
ODPI [04293] 2021-04-10 15:51:06.110: load with name /opt/oracle/lib/libclntsh.so
ODPI [04293] 2021-04-10 15:51:06.110: load by OS failure: /opt/oracle/lib/libclntsh.so: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "cdr_parser.py", line 387, in <module>
main()
And the script still not working.
Update 2: when i run: file /opt/oracle/lib/libclntsh.so i get:
/opt/oracle/lib/libclntsh.so: symbolic link to libclntsh.so.21.1
and running ldd /opt/oracle/lib/libclntsh.so the output is:
not a dynamic executable
Also, i verified libaio and liabio-devel install and it's correct, my Os's version is 64 bits and the instanclient is 64 bit too.