[R-sig-DB] ROracle loads from command line, but not RGUI/RStudio in OSX

Joran Elias jor@n@e||@@ @end|ng |rom gm@||@com
Mon Mar 11 16:27:19 CET 2013


I'm having some trouble getting ROracle up and running completely on my
computer (OS X 10.7.5, R 2.15.2).

Compiling ROracle was a little bit of an adventure, but I finally did get
it to compile by mostly following the Linux instructions with some
modifications pieced together from the web. When I run R from the command
line, ROracle loads fine, I can connect to the db and run queries.
Everything works. (I've also installed the Oracle utility sqlplus which
works as well; connecting, querying, etc.)

But if I try to load ROracle from either the R GUI or RStudio, I get this
error:

Loading required package: DBI
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object
'/Users/joranelias/Library/R/2.15/library/ROracle/libs/x86_64/ROracle.so':

dlopen(/Users/joranelias/Library/R/2.15/library/ROracle/libs/x86_64/ROracle.so,
6): Library not loaded:
/ade/b/2649109290/oracle/rdbms/lib/libclntsh.dylib.11.1
  Referenced from:
/Users/joranelias/Library/R/2.15/library/ROracle/libs/x86_64/ROracle.so
  Reason: image not found
Error: package/namespace load failed for �ROracle�

I examined how the environment variables are set between running R from the
command line and RGUI/RStudio, and noticed some differences, so I tried
making them the same via setting:

DYLD_LIBRARY_PATH =
/Library/Frameworks/R.framework/Resources/lib/x86_64::/Applications/Oracle
PATH =
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/texbin:/Applications/Oracle
TNS_ADMIN = /Applications/Oracle

so that my environment variables match what's reported by Sys.getenv() from
the command line. I've done this directly via Sys.setenv() and also using
.Renviron in the current directory. It appears to successfully set the
environment variables, but I still get the same error when trying to load
ROracle.

All I can think of is that I've somehow done something non-standard in
installing/compiling ROracle and the InstantClient software, but I can't
understand why it would work fine from the command line only. Does anyone
have any suggestions for other things I could try...?

	[[alternative HTML version deleted]]




More information about the R-sig-DB mailing list