-
-
Save haydnhkim/f6e8b1c66ce623ea23f6 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
#!/bin/bash | |
# INSTALL ORACLE INSTANT CLIENT # | |
################################# | |
# NOTE: Oracle requires at least 1176 MB of swap (or something around there). | |
echo "Now go get some the following two zip files ..." | |
echo "- basic: instantclient-basic-macos.x64-11.2.0.4.0.zip" | |
echo "- SDK/devel: instantclient-sdk-macos.x64-11.2.0.4.0.zip" | |
echo "... from this URL: http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html" | |
echo "WARNING: It's pretty annoying, they make you sign up for an Oracle account, etc." | |
echo 'I will assume you have put these two files are into ~/Downloads' | |
echo "Press any key once you're ready" && read -n 1 -s | |
# SET ENVIRONMENT VARIABLES # | |
############################# | |
# Source for this section: http://cx-oracle.sourceforge.net/BUILD.txt | |
echo '' >> $HOME/.bash_profile | |
echo '# Convoluted undocumented Oracle bullshit.' >> $HOME/.bash_profile | |
echo 'export ORACLE_HOME=$HOME/oracle' >> $HOME/.bash_profile | |
echo 'export LD_LIBRARY_PATH=$ORACLE_HOME' >> $HOME/.bash_profile | |
echo 'export DYLD_LIBRARY_PATH=$ORACLE_HOME' >> $HOME/.bash_profile | |
. $HOME/.bash_profile | |
# install oracle instant client | |
mkdir -p $ORACLE_HOME | |
cd $ORACLE_HOME | |
cp ~/Downloads/instantclient-basic-* $ORACLE_HOME | |
cp ~/Downloads/instantclient-sdk-* $ORACLE_HOME | |
tar -xvzf $ORACLE_HOME/instantclient-basic-* | |
tar -xvzf $ORACLE_HOME/instantclient-sdk-* | |
mv instantclient_11_2/* . | |
mv sdk/* . | |
ln -s libclntsh.dylib.11.1 libclntsh.dylib | |
ln -s libocci.dylib.11.1 libocci.dylib | |
# INSTALL cx_Oracle # | |
##################### | |
pip install cx_Oracle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for posting this - I was getting a linker error when trying to install cx-Oracle:
All I needed in my environment was to set
ORACLE_HOME
to where I unpacked the instant client zips (basic + sdk) and manually create the symlink for libclntsh.dylib and it worked.Now I think I will go take a shower.