title: Installing ROracle (and the Oracle Instant Client?) on MacOS
body: <p>I'm trying to install ROracle. Since ROracle requires the Oracle OCI libraries, I downloaded these files from the Oracle website: instantclient-basic-macos.x64-12.2.0.1.0, instantclient-sdk-macos.x64-12.2.0.1.0.zip. I put those files in ~/Library/Caches/Homebrew and install them using homebrew.</p>
  
  <pre><code>brew install instantclient-basic
  brew install instantclient-sdk
  </code></pre>
  
  <p>The Oracle website also mentioned the need to set some environment variables, so I put this in my .bashrc file:</p>
  
  <pre><code>export LD_LIBRARY_PATH=/usr/local/Cellar/instantclient-basiclite/12.2.0.1.0/lib:$LD_LIBRARY_PATH
  export DYLD_LIBRARY_PATH=/usr/local/Cellar/instantclient-basiclite/12.2.0.1.0/lib:$DYLD_LIBRARY_PATH
  export NLS_LANG=UTF8
  </code></pre>
  
  <p>But trying to install ROracle in R leads to this:</p>
  
  <pre><code>&gt; install.packages("ROracle")
  Installing package into ‘/usr/local/lib/R/3.4/site-library’
  (as ‘lib’ is unspecified)
  trying URL 'https://cran.rstudio.com/src/contrib/ROracle_1.3-1.tar.gz'
  Content type 'application/x-gzip' length 308252 bytes (301 KB)
  ==================================================
  downloaded 301 KB
  
  Warning in strptime(xx, f &lt;- "%Y-%m-%d %H:%M:%OS", tz = tz) :
  unknown timezone 'zone/tz/2017c.1.0/zoneinfo/America/Los_Angeles'
  * installing *source* package ‘ROracle’ ...
  ** package ‘ROracle’ successfully unpacked and MD5 sums checked
  configure: error: OCI libraries not found
  ERROR: configuration failed for package ‘ROracle’
  * removing ‘/usr/local/lib/R/3.4/site-library/ROracle’
  Warning in install.packages :
    installation of package ‘ROracle’ had non-zero exit status
  </code></pre>
  
  <p>R says it can't find the OCI libraries. Oracle's documentation has so far proven non-existent or worthless in resolving this issue, but I found a <a href="https://github.com/InstantClientTap/homebrew-instantclient/issues/11" rel="nofollow noreferrer">comment on the internet that seemed promising</a>. So I wrote this into my .bashrc and ran it:</p>
  
  <pre><code>R CMD INSTALL --configure-args='--with-oci-lib=/usr/local/Cellar/instantclient-basic/12.2.0.1.0/lib --with-oci-inc=/usr/local/Cellar/instantclient-sdk/12.2.0.1.0/lib/sdk/include' ROracle_1.3-1.tar.gz
  </code></pre>
  
  <p>With this result:</p>
  
  <pre><code>installing to /usr/local/lib/R/3.4/site-library/ROracle/libs
  ** R
  ** inst
  ** preparing package for lazy loading
  ** help
  *** installing help indices
  ** building package indices
  ** testing if installed package can be loaded
  Error: package or namespace load failed for ‘ROracle’ in dyn.load(file, DLLpath = DLLpath, ...):
  ****unable to load shared object '/usr/local/lib/R/3.4/site-
  library/ROracle/libs/ROracle.so':
      dlopen(/usr/local/lib/R/3.4/site-library/ROracle/libs/ROracle.so, 6): Symbol 
      not found: _ons_recvthread_clone_sb
    Referenced from: /usr/local/Cellar/instantclient-basic/12.2.0.1.0/lib/libons.dylib
    Expected in: flat namespace
   in /usr/local/Cellar/instantclient-basic/12.2.0.1.0/lib/libons.dylib
  Error: loading failed
  Execution halted
  ERROR: loading failed
  * removing ‘/usr/local/lib/R/3.4/site-library/ROracle’
  </code></pre>
  
  <p>So there's something wrong with libons.dylib? What am I supposed to do with that information?</p>