Last active
December 11, 2024 14:20
-
-
Save ajinkya-bhosale/57c2ef05835784cca588b43046db1b3f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Steps to Install Oracle Instant client and cx_Oracle on Fedora/CentOS/RHEL | |
1) Download Instant client from oracle website | |
http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html | |
e.g. for Linux 86_64 | |
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html | |
Download | |
1) oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm | |
2) oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm | |
3) oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm | |
Install all 2 packages using dnf | |
sudo dnf install oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm | |
oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm | |
oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm | |
Put following in /etc/bashrc file | |
export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib/ | |
export ORACLE_HOME=/usr/lib/oracle/11.2/client64 | |
export PATH=$ORACLE_HOME/bin:$PATH | |
OR following command in Terminal | |
echo export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib/ >> /etc/bashrc | |
echo export ORACLE_HOME=/usr/lib/oracle/11.2/client64 >> /etc/bashrc | |
echo export PATH=$ORACLE_HOME/bin:$PATH >> /etc/bashrc | |
Now intall cx_Oracle using pip | |
sudo pip install cx_Oracle | |
test cx_Oracle by runing in Terminal | |
python -c "import cx_Oracle" | |
References - | |
1) http://www.leccionespracticas.com/uncategorized/python-oracle-solved-importerror-libclntsh-so-11-1-wrong-elf-class-elfclass32 | |
2) http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html | |
3) http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html | |
4) http://ubuntugeeknerd.blogspot.in/2013/08/how-to-install-oxoracle-in-rhel-64-bit.html | |
5) https://code.djangoproject.com/wiki/OracleTestSetup | |
6) https://www.mylinuxplace.com/install-cx_oracle-on-centos-7/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment