Using ROracle with Oracle Instant Client 12c

February 18, 2016
By

[This article was first published on R – Nodalpoint, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

The other day, while setting up the new Oracle R Enterprise (ORE) 1.5 client packages in a Linux server, we installed the Oracle DB Instant Client v. 12.1, as advised in the relevant documentation.

Problem was, ORE failed to load, in fact due to ROracle failure:

> library(ORE)
[...]
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object '/usr/lib64/R/library/ROracle/libs/ROracle.so':
  libclntsh.so.11.1: cannot open shared object file: No such file or directory
Error: package ‘OREdm’ could not be loaded

Truth is, the file libclntsh.so.11.1 did not exist, but this was expected, simply due to the installed client being 12.1, and not 11.1:

[[email protected] ~]$ cd /usr/lib/oracle/12.1/client64/lib
[[email protected] lib]$ ll
total 190276
[...]
-rwxrwxr-x 1 root root   6990875 Jul  7  2014 libclntshcore.so.12.1
-rwxrwxr-x 1 root root  58793741 Jul  7  2014 libclntsh.so.12.1
[...]

What is happening is that ROracle, despite being up to date (version 1.2-1), looks only for the 11.1 client.

The solution is to create a symbolic link in the Oracle Instant Client directory, pointing from the file libclntsh.so.11.1 (which is what ROracle is looking for) to libclntsh.so.12.1 (the existing one):

[[email protected] lib]$ ln -s libclntsh.so.12.1 libclntsh.so.11.1
[[email protected] lib]$ ll
total 190276
[...]
lrwxrwxrwx 1 root root        17 Feb 16 12:36 libclntsh.so.11.1 -> libclntsh.so.12.1
[...]

after which the issue is resolved.

See also the discussion I opened in the relevant Oracle R Technologies forum.

The post Using ROracle with Oracle Instant Client 12c appeared first on Nodalpoint.

To leave a comment for the author, please follow the link and comment on their blog: R – Nodalpoint.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)