Oracle Instant Client on OS X Revision as of Sunday, 20 December 2015 at 19:56 UTC
Needed this for Node.js.
- Head to the download
page.
Login required since Oracle is a terrible organization. - Download these files:
instantclient-basic-macos.x64-11.2.0.3.0.zip
instantclient-sdk-macos.x64-11.2.0.3.0.zip
instantclient-sqlplus-macos.x64-11.2.0.3.0.zip
instantclient-jdbc-macos.x64-11.2.0.3.0.zip
- Extract them at the command line. You’ll get a folder called
“instantclient_11_2” - Move it to
/usr/local
sudo mkdir /usr/local/oracle
sudo mv instantclient_11_2 /usr/local/oracle/instantclient
sudo chown user:group /usr/local/oracle
- Set some environment variables
export OCI_HOME=/usr/local/oracle/instantclient
export OCI_LIB_DIR=$OCI_HOME
export OCI_INCLUDE_DIR=$OCI_HOME/sdk/include
export NLS_LANG=AMERICAN_AMERICA.UTF8
export DYLD_LIBRARY_PATH=$OCI_LIB_DIR
- Last steps
cd $OCI_LIB_DIR
ln -s libclntsh.dylib.11.1 libclntsh.dylib
ln -s libocci.dylib.11.1 libocci.dylib