Laden Sie Folgendes von [Instant Client Downloads] herunter (http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html "Instant Client Downloads für Linux x86-64")
Installieren Sie nach dem Herunterladen das RPM-Paket.
$ sudo rpm -ivh oracle-instantclient-basic-10.2.0.5-1.x86_64.rpm
$ sudo rpm -ivh oracle-instantclient-devel-10.2.0.5-1.x86_64.rpm
$ sudo rpm -ivh oracle-instantclient-sqlplus-10.2.0.5-1.x86_64.rpm
export ORACLE_HOME=/usr/lib/oracle/10.2.0.5/client64
export PATH=$PATH:$ORACLE_HOME/bin
sudo ln -s /usr/include/oracle/10.2.0.5/client64 /usr/lib/oracle/10.2.0.5/client64/include
$ sudo vim /etc/ld.so.conf.d/oracle.conf
Schreib das Folgende:
/usr/lib/oracle/10.2.0.5/client64/lib/
Führen Sie nach dem Speichern den folgenden Befehl aus
$ sudo /sbin/ldconfig
$ /usr/local/python2.7/bin/python setup.py build
$ sudo cp build/lib.linux-x86_64-2.7-10g/cx_Oracle.so /usr/local/python2.7/lib/python2.7/site-packages/
$ /usr/local/python2.7/bin/python
>>>import cx_Oracle
>>>
Recommended Posts