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

Prof Brian Ripley r|p|ey @end|ng |rom @t@t@@ox@@c@uk
Mon Mar 11 16:45:48 CET 2013


The message indicates DYLD_LIBRARY_PATH problems.

But:

- double colons are wrong.

- /Applications/Oracle would be a very un-Apple layout, and a non-Unix 
location for a library directory.

But I've never seen Oracle for a Mac, so have no idea what the layout 
is.  The ROracle authors might know (and do read this list).

In the Terminal, run

R CMD otool -L 
/Users/joranelias/Library/R/2.15/library/ROracle/libs/x86_64/ROracle.so

and make sure the directories to Oracle dylibs it mentions are on 
DYLD_LIBRARY_PATH.

On 11/03/2013 15:27, Joran Elias wrote:
> 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]]
>
>
>
> _______________________________________________
> R-sig-DB mailing list -- R Special Interest Group
> R-sig-DB using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-db
>


-- 
Brian D. Ripley,                  ripley using stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-sig-DB mailing list