Skip to Main Content

Data Science & Machine Learning

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ROracle installation with Oracle 12 libraries

RoyGoodmanJan 23 2020 — edited Feb 4 2020

Hello:

I am having problems installing ROracle on Ubuntu 16.04. We currently have it running fine with Oracle instantclient version 10, but we are upgrading to Oracle 12. I am trying now to build and install ROracle linked against the Oracle 12 libraries. It seems to work until it tries to load the library, at which point it complains that it can't find the version 12 libclntsh.so library. I have pointed all the environment variables I can think of to where it lives, but no joy. Can anyone look at the log below and tell me where I am going wrong?

Thanks very much.

Roy Goodman

$ echo $LD_LIBRARY_PATH

/usr/lib/oracle/12.2/client64/lib/

$ echo $LD_LIBRARY_PATH_64

/usr/lib/oracle/12.2/client64/lib/

$ echo $ORACLE_HOME

/usr/lib/oracle/12.2/client64/

$ ls -l $LD_LIBRARY_PATH/libclntsh*

lrwxrwxrwx 1 root root       21 Apr  3  2019 /usr/lib/oracle/12.2/client64/lib//libclntshcore.so -> libclntshcore.so.12.1

-rw-rwxr-- 1 root root  8033199 Jan 26  2017 /usr/lib/oracle/12.2/client64/lib//libclntshcore.so.12.1

lrwxrwxrwx 1 root root       17 Apr  3  2019 /usr/lib/oracle/12.2/client64/lib//libclntsh.so -> libclntsh.so.12.1

-rw-rwxr-- 1 root root 71638263 Jan 26  2017 /usr/lib/oracle/12.2/client64/lib//libclntsh.so.12.1

$ sudo R

R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"

Copyright (C) 2015 The R Foundation for Statistical Computing

Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.

You are welcome to redistribute it under certain conditions.

Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.

Type 'contributors()' for more information and

'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or

'help.start()' for an HTML browser interface to help.

Type 'q()' to quit R.

> install.packages("ROracle", dependencies = TRUE, repos='http://cran.mirrors.hoobly.com', configure.args=" --with-oci-inc=/usr/include/oracle/12.2/client64 --with-oci-lib=/usr/lib/oracle/12.2/client64/lib" )

Installing package into ‘/usr/local/lib/R/site-library’

(as ‘lib’ is unspecified)

trying URL 'http://cran.mirrors.hoobly.com/src/contrib/ROracle_1.3-1.tar.gz'

Content type 'application/x-gzip' length 308252 bytes (301 KB)

==================================================

downloaded 301 KB

* installing *source* package ‘ROracle’ ...

** package ‘ROracle’ successfully unpacked and MD5 sums checked

configure: creating ./config.status

config.status: creating src/Makevars

** libs

gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/usr/include/oracle/12.2/client64     -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c rodbi.c -o rodbi.o

In file included from rodbi.c:182:0:

rodbi.c: In function ‘rodbiResBind’:

rodbi.h:43:20: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘sb8 {aka long int}’ [-Wformat=]

# define _(String) (String)

                    ^

rodbi.c:200:36: note: in expansion of macro ‘_’

#define RODBI_ERR_BIND_VAL_TOOBIG  _("bind value is too big(%lld), exceeds 2GB")

                                    ^

rodbi.c:2432:26: note: in expansion of macro ‘RODBI_ERR_BIND_VAL_TOOBIG’

         sprintf(err_buf, RODBI_ERR_BIND_VAL_TOOBIG, bndsz);

                          ^

rodbi.h:43:20: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘sb8 {aka long int}’ [-Wformat=]

# define _(String) (String)

                    ^

rodbi.c:200:36: note: in expansion of macro ‘_’

#define RODBI_ERR_BIND_VAL_TOOBIG  _("bind value is too big(%lld), exceeds 2GB")

                                    ^

rodbi.c:2469:26: note: in expansion of macro ‘RODBI_ERR_BIND_VAL_TOOBIG’

         sprintf(err_buf, RODBI_ERR_BIND_VAL_TOOBIG, bndsz);

                          ^

rodbi.c: In function ‘rodbiPlsqlResBind’:

rodbi.h:43:20: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘sb8 {aka long int}’ [-Wformat=]

# define _(String) (String)

                    ^

rodbi.c:200:36: note: in expansion of macro ‘_’

#define RODBI_ERR_BIND_VAL_TOOBIG  _("bind value is too big(%lld), exceeds 2GB")

                                    ^

rodbi.c:2816:28: note: in expansion of macro ‘RODBI_ERR_BIND_VAL_TOOBIG’

           sprintf(err_buf, RODBI_ERR_BIND_VAL_TOOBIG, bndsz);

                            ^

rodbi.h:43:20: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘sb8 {aka long int}’ [-Wformat=]

# define _(String) (String)

                    ^

rodbi.c:200:36: note: in expansion of macro ‘_’

#define RODBI_ERR_BIND_VAL_TOOBIG  _("bind value is too big(%lld), exceeds 2GB")

                                    ^

rodbi.c:2861:28: note: in expansion of macro ‘RODBI_ERR_BIND_VAL_TOOBIG’

           sprintf(err_buf, RODBI_ERR_BIND_VAL_TOOBIG, bndsz);

                            ^

gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/usr/include/oracle/12.2/client64     -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c rooci.c -o rooci.o

gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o ROracle.so rodbi.o rooci.o -L/usr/lib/oracle/12.2/client64/lib -lclntsh -L/usr/lib/R/lib -lR

installing to /usr/local/lib/R/site-library/ROracle/libs

** R

** inst

** preparing package for lazy loading

Creating a generic function for ‘summary’ from package ‘base’ in package ‘ROracle’

** help

*** installing help indices

** building package indices

** testing if installed package can be loaded

Error in dyn.load(file, DLLpath = DLLpath, ...) :

  unable to load shared object '/usr/local/lib/R/site-library/ROracle/libs/ROracle.so':

  libclntsh.so.12.1: cannot open shared object file: No such file or directory

Error: loading failed

Execution halted

ERROR: loading failed

* removing ‘/usr/local/lib/R/site-library/ROracle’

* restoring previous ‘/usr/local/lib/R/site-library/ROracle’

The downloaded source packages are in

‘/tmp/Rtmp372E0t/downloaded_packages’

Warning message:

In install.packages("ROracle", dependencies = TRUE, repos = "http://cran.mirrors.hoobly.com",  :

  installation of package ‘ROracle’ had non-zero exit status

>

This post has been answered by RoyGoodman on Feb 4 2020
Jump to Answer
Comments
Post Details
Added on Jan 23 2020
2 comments
1,523 views