Hi,
I need to connect to Oracle database with python using cx_Oracle 8.0.1. But getting bit version mismatch error while connecting as Solaris 10 and Oracle database both are 64 bit while python 3.6.1 is getting installed as 32 bit in Solaris with python source release.
Error :-
-bash-3.2$ python
Python 3.6.1 (default, Sep 25 2023, 16:02:20)
[GCC 3.4.3 (csl-sol210-3_4-branch+sol_rpath)] on sunos5
Type “help”, “copyright”, “credits” or “license” for more information.
import cx_Oracle
cx_Oracle.connect(‘/@localhost:/’)
Traceback (most recent call last):
File “”, line 1, in
cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 32-bit Oracle Client library: “ld.so.1: python: fatal: /oracle/tmmbbkp/lib/libclntsh.so: wrong ELF class: ELFCLASS64”. See cx_Oracle 8 Installation — cx_Oracle 8.3.0 documentation for help
Solaris 10 bit :-
/usr/bin/isainfo -kv
64-bit sparcv9 kernel modules
Oracle bit:-
file /oracle/bin/sqlplus
/oracle/bin/sqlplus: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped
Python 3.6.1 bit
file /Python-3.6.1/python
/Python-3.6.1/python: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped
cx_Oracle 8.0.1 bit:-
file /usr/local/lib/python3.6/site-packages/cx_Oracle-8.0.1-py3.6-solaris-2.10-sun4u.32bit.egg/cx_Oracle.so
/usr/local/lib/python3.6/site-packages/cx_Oracle-8.0.1-py3.6-solaris-2.10-sun4u.32bit.egg/cx_Oracle.so: ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked, not stripped
Please help if anyone can provide information on resolving the error. Thanks in advance.