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

前端 未结 5 1643
-上瘾入骨i
-上瘾入骨i 2021-01-13 20:09

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.

相关标签:
5条回答
  • 2021-01-13 20:16

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

    0 讨论(0)
  • 2021-01-13 20:16

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

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

    References:

    Setting LD_LIBRARY_PATH from inside R

    0 讨论(0)
  • 2021-01-13 20:19

    Set this in /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
    

    This helped me.

    0 讨论(0)
  • 2021-01-13 20:34

    set $LD_LIBARARY_PATH=$ORACLE_HOME/lib

    0 讨论(0)
  • 2021-01-13 20:35

    I got same error while 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
    

    Looks like the shared object ROracle.so is referring to 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 work around, I have created a symlink, so that libclntsh.so.12.1 can be referred as 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 am able to load library(ORE) successfully.

    Please see my website for more details.

    0 讨论(0)
提交回复
热议问题