{ "created": "2021-06-04T03:52:15Z", "hierarchy": [ { "name": "ROOT", "type": "folder", "uri": "/ROOT" }, { "name": "Ancient Sysadmin Stuff", "type": "folder", "uri": "Ancient_Sysadmin_Stuff" }, { "name": "Oracle Instant Client on OS X", "type": "article", "uri": "Ancient_Sysadmin_Stuff/Oracle_Instant_Client_on_OS_X" } ], "html": "\n\n \n \n \n \n\n \n \n\n \n \n \n \n \n\n Oracle Instant Client on OS X\n\n \n \n \n \n
\n
\n \n
\n
\n \n \n\n\n

Oracle Instant Client on OS X

\n\n

Head to the download page (login required since Oracle is terrible) and download these files

\n
instantclient-basic-macos.x64-12.2.0.1.0-2.zip\ninstantclient-sdk-macos.x64-12.2.0.1.0-2.zip\ninstantclient-sqlplus-macos.x64-12.2.0.1.0-2.zip\n
\n

Make sure that you get the 64-bit versions (for 64-bit Pythons), else you’ll see something like this at import

\n
ImportError: dlopen(/Users/nikhil/.pyenv/versions/manifold-api/lib/python2.7/site-packages/cx_Oracle.so, 2): Symbol not found: _OCIAttrGet  \n  Referenced from: /Users/nikhil/.pyenv/versions/manifold-api/lib/python2.7/site-packages/cx_Oracle.so  \n  Expected in: flat namespace\n
\n

Easy Way

\n

Uses Homebrew. Copy the files downloaded above to /Users/$USER/Library/Caches/Homebrew. Then run these commands

\n
brew install InstantClientTap/instantclient/instantclient-basic\nbrew install InstantClientTap/instantclient/instantclient-sdk\nbrew install InstantClientTap/instantclient/instantclient-sqlplus\n

Done! To set up tnsnames.ora,

\n
mkdir -p /usr/local/opt/instantclient-basic/network/admin\ntouch /usr/local/opt/instantclient-basic/network/admin/tnsnames.ora\n

and add stuff to that file.

\n

Laborious Way

\n\n
sudo mkdir /usr/local/oracle  \nsudo mv instantclient_12_2 /usr/local/oracle/instantclient  \nsudo chown user:group /usr/local/oracle\n
\n
export ORACLE_HOME=/usr/local/oracle/instantclient  \nexport OCI_HOME=$ORACLE_HOME  \nexport OCI_LIB_DIR=$OCI_HOME  \nexport OCI_INCLUDE_DIR=$OCI_HOME/sdk/include  \nexport NLS_LANG=AMERICAN_AMERICA.UTF8  \nexport DYLD_LIBRARY_PATH=$OCI_LIB_DIR\n
\n
cd $OCI_LIB_DIR  \nln -s libclntsh.dylib.11.1 libclntsh.dylib  \nln -s libocci.dylib.11.1 libocci.dylib\n
\n\n
\n \n
\n \n \n \n \n \n\n", "id": "01a59d8e-aab3-52c5-aaf9-4051d1ffe55d", "modified": "2022-06-13T23:23:48Z", "revisions": [ { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2022-06-13T23:23:48Z", "id": "6be928c4c8de048934c03e3c61539c9ceec7d59a", "shortId": "6be928c4", "subject": "Update config.yml", "content": "Head to [the download page](http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html) (login required since Oracle is terrible) and download these files \n\n instantclient-basic-macos.x64-12.2.0.1.0-2.zip\n instantclient-sdk-macos.x64-12.2.0.1.0-2.zip\n instantclient-sqlplus-macos.x64-12.2.0.1.0-2.zip\n\nMake sure that you get the 64-bit versions (for 64-bit Pythons), else you'll see something like this at import\n\n ImportError: dlopen(/Users/nikhil/.pyenv/versions/manifold-api/lib/python2.7/site-packages/cx_Oracle.so, 2): Symbol not found: _OCIAttrGet \n   Referenced from: /Users/nikhil/.pyenv/versions/manifold-api/lib/python2.7/site-packages/cx_Oracle.so \n   Expected in: flat namespace\n\n### Easy Way\n\nUses Homebrew. Copy the files downloaded above to `/Users/$USER/Library/Caches/Homebrew`. Then run [these commands](https://github.com/InstantClientTap/homebrew-instantclient)\n\n```bash\nbrew install InstantClientTap/instantclient/instantclient-basic\nbrew install InstantClientTap/instantclient/instantclient-sdk\nbrew install InstantClientTap/instantclient/instantclient-sqlplus\n```\n\nDone! To set up `tnsnames.ora`,\n\n```bash\nmkdir -p /usr/local/opt/instantclient-basic/network/admin\ntouch /usr/local/opt/instantclient-basic/network/admin/tnsnames.ora\n```\n\nand add stuff to that file.\n\n### Laborious Way\n\n* Extract the downloaded files at the command line. You'll get a folder called `instantclient_12_2`\n\n* Move it to `/usr/local`\n\n```bash\nsudo mkdir /usr/local/oracle \nsudo mv instantclient_12_2 /usr/local/oracle/instantclient \nsudo chown user:group /usr/local/oracle\n```\n\n* Set some environment variables\n\n```bash\nexport ORACLE_HOME=/usr/local/oracle/instantclient \nexport OCI_HOME=$ORACLE_HOME \nexport OCI_LIB_DIR=$OCI_HOME \nexport OCI_INCLUDE_DIR=$OCI_HOME/sdk/include \nexport NLS_LANG=AMERICAN_AMERICA.UTF8 \nexport DYLD_LIBRARY_PATH=$OCI_LIB_DIR\n```\n\n* Last steps\n\n```bash\ncd $OCI_LIB_DIR \nln -s libclntsh.dylib.11.1 libclntsh.dylib \nln -s libocci.dylib.11.1 libocci.dylib\n```\n" }, { "authorEmail": "nikhilanand@granular.ag", "authorName": "Nikhil Anand", "date": "2021-06-04T03:52:15Z", "id": "a0b139bf48db210c78d3aa8551d47212ca06c6ed", "shortId": "a0b139bf", "subject": "Reorg 2\n", "content": "Head to [the download page](http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html) (login required since Oracle is terrible) and download these files \n\n instantclient-basic-macos.x64-12.2.0.1.0-2.zip\n instantclient-sdk-macos.x64-12.2.0.1.0-2.zip\n instantclient-sqlplus-macos.x64-12.2.0.1.0-2.zip\n\nMake sure that you get the 64-bit versions (for 64-bit Pythons), else you'll see something like this at import\n\n ImportError: dlopen(/Users/nikhil/.pyenv/versions/manifold-api/lib/python2.7/site-packages/cx_Oracle.so, 2): Symbol not found: _OCIAttrGet \n   Referenced from: /Users/nikhil/.pyenv/versions/manifold-api/lib/python2.7/site-packages/cx_Oracle.so \n   Expected in: flat namespace\n\n### Easy Way\n\nUses Homebrew. Copy the files downloaded above to `/Users/$USER/Library/Caches/Homebrew`. Then run [these commands](https://github.com/InstantClientTap/homebrew-instantclient)\n\n```bash\nbrew install InstantClientTap/instantclient/instantclient-basic\nbrew install InstantClientTap/instantclient/instantclient-sdk\nbrew install InstantClientTap/instantclient/instantclient-sqlplus\n```\n\nDone! To set up `tnsnames.ora`,\n\n```bash\nmkdir -p /usr/local/opt/instantclient-basic/network/admin\ntouch /usr/local/opt/instantclient-basic/network/admin/tnsnames.ora\n```\n\nand add stuff to that file.\n\n### Laborious Way\n\n* Extract the downloaded files at the command line. You'll get a folder called `instantclient_12_2`\n\n* Move it to `/usr/local`\n\n```bash\nsudo mkdir /usr/local/oracle \nsudo mv instantclient_12_2 /usr/local/oracle/instantclient \nsudo chown user:group /usr/local/oracle\n```\n\n* Set some environment variables\n\n```bash\nexport ORACLE_HOME=/usr/local/oracle/instantclient \nexport OCI_HOME=$ORACLE_HOME \nexport OCI_LIB_DIR=$OCI_HOME \nexport OCI_INCLUDE_DIR=$OCI_HOME/sdk/include \nexport NLS_LANG=AMERICAN_AMERICA.UTF8 \nexport DYLD_LIBRARY_PATH=$OCI_LIB_DIR\n```\n\n* Last steps\n\n```bash\ncd $OCI_LIB_DIR \nln -s libclntsh.dylib.11.1 libclntsh.dylib \nln -s libocci.dylib.11.1 libocci.dylib\n```\n" } ], "sizeInBytes": 2060, "source": "Head to [the download page](http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html) (login required since Oracle is terrible) and download these files \n\n instantclient-basic-macos.x64-12.2.0.1.0-2.zip\n instantclient-sdk-macos.x64-12.2.0.1.0-2.zip\n instantclient-sqlplus-macos.x64-12.2.0.1.0-2.zip\n\nMake sure that you get the 64-bit versions (for 64-bit Pythons), else you'll see something like this at import\n\n ImportError: dlopen(/Users/nikhil/.pyenv/versions/manifold-api/lib/python2.7/site-packages/cx_Oracle.so, 2): Symbol not found: _OCIAttrGet \n   Referenced from: /Users/nikhil/.pyenv/versions/manifold-api/lib/python2.7/site-packages/cx_Oracle.so \n   Expected in: flat namespace\n\n### Easy Way\n\nUses Homebrew. Copy the files downloaded above to `/Users/$USER/Library/Caches/Homebrew`. Then run [these commands](https://github.com/InstantClientTap/homebrew-instantclient)\n\n```bash\nbrew install InstantClientTap/instantclient/instantclient-basic\nbrew install InstantClientTap/instantclient/instantclient-sdk\nbrew install InstantClientTap/instantclient/instantclient-sqlplus\n```\n\nDone! To set up `tnsnames.ora`,\n\n```bash\nmkdir -p /usr/local/opt/instantclient-basic/network/admin\ntouch /usr/local/opt/instantclient-basic/network/admin/tnsnames.ora\n```\n\nand add stuff to that file.\n\n### Laborious Way\n\n* Extract the downloaded files at the command line. You'll get a folder called `instantclient_12_2`\n\n* Move it to `/usr/local`\n\n```bash\nsudo mkdir /usr/local/oracle \nsudo mv instantclient_12_2 /usr/local/oracle/instantclient \nsudo chown user:group /usr/local/oracle\n```\n\n* Set some environment variables\n\n```bash\nexport ORACLE_HOME=/usr/local/oracle/instantclient \nexport OCI_HOME=$ORACLE_HOME \nexport OCI_LIB_DIR=$OCI_HOME \nexport OCI_INCLUDE_DIR=$OCI_HOME/sdk/include \nexport NLS_LANG=AMERICAN_AMERICA.UTF8 \nexport DYLD_LIBRARY_PATH=$OCI_LIB_DIR\n```\n\n* Last steps\n\n```bash\ncd $OCI_LIB_DIR \nln -s libclntsh.dylib.11.1 libclntsh.dylib \nln -s libocci.dylib.11.1 libocci.dylib\n```\n", "title": "Oracle Instant Client on OS X", "untracked": false, "uri": "/Ancient_Sysadmin_Stuff/Oracle_Instant_Client_on_OS_X" }