Using ROracle with Oracle Instant Client 12c
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:
[ctsats@dev-hd-01 ~]$ cd /usr/lib/oracle/12.1/client64/lib [ctsats@dev-hd-01 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):
[ctsats@dev-hd-01 lib]$ ln -s libclntsh.so.12.1 libclntsh.so.11.1 [ctsats@dev-hd-01 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.
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.