Failed to load ROracle: unable to load shared object ROracle.so: libclntsh.so.11.1 No such file or directory

Therefore, I cannot download ROracle. I am really very new to this, so any information is appreciated, and any information about what additional information will give will also be useful.

> library(ROracle) Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '~/R/x86_64-pc-linux-gnu-library/2.14/ROracle/libs/ROracle.so': libclntsh.so.11.1: cannot open shared object file: No such file or directory Error: package/namespace load failed for 'ROracle' 

ROracle.so is exactly where it says. libclntsh.so.11.1 can be found at /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1 . This is the result of .libPaths :

 > .libPaths() [1] "/home/nguiller/R/x86_64-pc-linux-gnu-library/2.14" "/usr/local/lib/R/site-library" "/usr/lib/R/site-library" [4] "/usr/lib/R/library" "/usr/lib/rstudio/R/library" 

My .Renviron file

 LD_LIBRARY_PATH="/usr/lib/oracle/11.2/client64/lib:/home/nguiller/Downloads/instantclient_11_2" ORACLE_HOME="/usr/lib/oracle/11.2/client64/:/home/nguiller/Downloads/instantclient_11_2" OCI_LIB="/usr/lib/oracle/11.2/client64/lib" 

I had a lot of problems installing ROracle for starters due to OCI libraries, but in the end it worked with R CMD INSTALL --configure-ags='--with-oci-lib=/usr/lib/oracle/11.2/client64/lib --with-oci-inc=/usr/include/oracle/11.2/client64' ROracle_1.1-8.tar.gz

Let me know how I can help.

+4
source share
5 answers

ORACLE_HOME must point to only one location. Shouldn't you set the variable LD_LIBRARY_PATH_64?

+2
source

I have the same error loading "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 

It looks like the generic ROracle.so object is referencing libclntsh.so.11.1 instead of libclntsh.so.12.1

 bash-4.1$ pwd /usr/lib64/R/library bash-4.1$ grep -irsh "libclntsh.so.11.1" * Binary file ROracle/libs/ROracle.so matches 

As a job, I created a symbolic link, so libclntsh.so.12.1 can be called libclntsh.so.11.1.

 $ cd /scratch/softwares/R/db_instant_client/instantclient_12_1 ln -s libclntsh.so.12.1 libclntsh.so.11.1 

After this step, I can successfully load the library (ORE).

See my site for more details.

0
source

set $ LD_LIBARARY_PATH = $ ORACLE_HOME / lib

0
source

If you really really want to do this in the R environment, you can load a specific library as follows:

 dyn.load("/usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1") library(ROracle) 

Literature:

Setting LD_LIBRARY_PATH from inside R

0
source

Set this to /etc/rstudio/rserver.conf

 rsession-ld-library- path=/usr/lib64/R/lib:/home/oracle/app/oracle/product/12.1.0/client_1/lib 

Then restart rserver

 sudo rstudio-server stop sudo rstudio-server start 

It helps me.

0
source

All Articles