I have been trying to setup a connection to an Oracle database from R. Works great from Windows and Linux, but can't seem to get it to work on a Mac. Here is another article from which I followed the instructions with no luck. I would prefer to use the RODBC package, but am ok with using ROracle (I couldn't get either to work). I am tried the Oracle Instant Client and Actual Technologies drivers. Any help would be greatly appreciated.
Installing ROracle on Mac OS X - what is needed from Oracle?
Using the Active Technologies driver, I have setup and successfully tested the connection from the ODBC Manager, but odbcDataSources()
doesn't return any of the connections I have defined.
The ROracle won't install due to a compilation error:
ld: library not found for -lclntsh
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ROracle.so] Error 1
ERROR: compilation failed for package ‘ROracle’
* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/ROracle’
Seems the instant client doesn't put files in the correct directories when you unzip them. Here is how I organized the files:
bin/adrci
bin/genezi
bin/sqlplus
bin/uidrvci
lib/libclntsh.dylib.11.1
lib/libnnz11.dylib
lib/libocci.dylib.11.1
lib/libociei.dylib
lib/libocijdbc11.dylib
lib/sqlplus.dylib
lib/sqlplusic.dylib
lib/odbc5.jar
lib/odbc6.jar
lib/xstream.jar
sdk/ - All the files from that ZIP file
I also had to create a rdbms/public directory. I put all the header files (.h) which got me further in the process.