Created
February 18, 2013 10:25
-
-
Save caglartoklu/4976464 to your computer and use it in GitHub Desktop.
.bash_profile configuration for Python 2.6, cx_Oracle 5.1.2, Oracle Client 11.2.0 on RHEL 6.3 #bash #oracle #shell
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
# save this file as .bash_profile, or merge with the existing one. | |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi | |
# User specific environment and startup programs | |
# Red Hat Enterprise Linux Server release 6.3, x84_64 | |
# Oracle Client 11.2.0 (not Instant Client) | |
# Python 2.6 | |
# cx_Oracle 5.1.2 | |
PATH=$PATH:$HOME/bin | |
export PATH | |
ORACLE_BASE=/u01/app/oracle | |
export ORACLE_BASE | |
# ORACLE_HOME=/u01/app/oracle/product/11.2.0/client_1 | |
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/client_1 | |
export ORACLE_HOME | |
ORACLE_SID=orcl | |
export ORACLE_SID | |
# If LD_LIBRARY_PATH includes $ORACLE_HOME/lib, we have this pyexpat error: | |
# >>> import pyexpat | |
# ImportError: /usr/lib64/python2.6/site-packages/_xmlplus/parsers/pyexpat.so: | |
# symbol XML_SetHashSalt, version EXPAT_2_0_1_RH not defined in file libexpat.so.1 with link time reference | |
# | |
# If LD_LIBRARY_PATH does not include $ORACLE_HOME/lib, we have this cx_Oracle error: | |
# >>> import cx_Oracle | |
# ImportError: libclntsh.so.11.1: cannot open shared object file: | |
# No such file or directory | |
# | |
# Solution to make them both happy: | |
# cd $ORACLE_HOME/lib | |
# mkdir DISABLED | |
# sudo mv libexpat* DISABLED | |
LD_LIBRARY_PATH=$ORACLE_HOME/lib | |
export LD_LIBRARY_PATH | |
PATH=$PATH:$ORACLE_HOME/bin | |
# PATH=$PATH:$ORACLE_HOME/lib | |
export PATH | |
# umask 022 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment