Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

r

oracle

rstudio

So I can't load ROracle. I am indeed very new to this so any information is appreciated and any info regarding what further information to give would be helpful as well.

> 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 it is. 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 trouble installing ROracle to begin with due to OCI libraries but it eventually 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.

like image 937
Nils Guillermin Avatar asked Nov 26 '22 16:11

Nils Guillermin


1 Answers

ORACLE_HOME should point to just one location. Shouldn't you set LD_LIBRARY_PATH_64 variable?

like image 88
igr Avatar answered Nov 29 '22 04:11

igr