This discussion is archived
7 Replies Latest reply: Feb 1, 2013 4:31 PM by 988674 RSS

Rstudio Error for loading library ORE

user8571166 Newbie
Currently Being Moderated
Rstudio is unable to load Library ORE. I get following error
( I have used all install steps described in Oracle® R Enterprise , User's Guide Release 11.2 for Linux, Solaris, AIX, and Windows
E26499-05. Any help is appreciated.)
library("ORE")
Loading required package: OREbase
Loading required package: ROracle
Loading required package: DBI
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 'ROracle' could not be loaded

Thanks
  • 1. Re: Rstudio Error for loading library ORE
    Sherry LaMonica Journeyer
    Currently Being Moderated
    You'll need to add your $ORACLE_HOME/lib and $R_HOME/lib to your LD_LIBRARY_PATH to resolve this error. For example, on my Linux 64-bit server:


    export LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/dbhome_1/lib:/usr/lib64/R/lib:$LD_LIBRARY_PATH

    Hope this helps.

    --Sherry                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
  • 2. Re: Rstudio Error for loading library ORE
    Sean S. Han Newbie
    Currently Being Moderated
    Hi..

    I am not sure but your answer is not working for me.
    I added those environment variable to /etc/profile.

    ==========================================
    [oracle@bigdata libs]$ export
    declare -x CVS_RSH="ssh"
    declare -x EDITOR="vi"
    declare -x G_BROKEN_FILENAMES="1"
    declare -x HISTSIZE="1000"
    declare -x HOME="/home/oracle"
    declare -x HOSTNAME="bigdata.kr.oracle.com"
    declare -x INPUTRC="/etc/inputrc"
    declare -x LANG="en_US.UTF-8"
    declare -x LD_LIBRARY_PATH="/u01/app/oracle/product/11.2.0/dbhome_1/lib:/usr/lib64/R/lib:"
    declare -x LESSOPEN="|/usr/bin/lesspipe.sh %s"
    declare -x LOGNAME="oracle"
    declare -x LS_COLORS="no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:"
    declare -x MAIL="/var/spool/mail/oracle"
    declare -x OLDPWD="/usr/lib64/R/library/ROracle"
    declare -x ORACLE_BASE="/u01/app/oracle"
    declare -x ORACLE_HOME="/u01/app/oracle/product/11.2.0.3/dbhome_1"
    declare -x ORACLE_OWNER="oracle"
    declare -x ORACLE_SID="orcl"
    declare -x PATH="/u01/app/oracle/product/11.2.0.3/dbhome_1/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin"
    declare -x PWD="/usr/lib64/R/library/ROracle/libs"
    declare -x R_HOME="/usr/lib64/R"
    declare -x SHELL="/bin/bash"
    declare -x SHLVL="1"
    declare -x SSH_ASKPASS="/usr/libexec/openssh/gnome-ssh-askpass"
    declare -x SSH_CLIENT="10.179.91.25 50053 22"
    declare -x SSH_CONNECTION="10.179.91.25 50053 10.179.91.36 22"
    declare -x SSH_TTY="/dev/pts/1"
    declare -x TERM="xterm"
    declare -x USER="oracle"
    ==========================================
    library(ORE)
    Loading required package: OREbase

    Attaching package: ‘OREbase’

    The following object(s) are masked from ‘package:base’:

    cbind, data.frame, eval, interaction, order, paste, pmax, pmin, rbind, table

    Loading required package: OREstats
    Loading required package: MASS
    Loading required package: OREgraphics
    Loading required package: OREeda
    Loading required package: OREdm
    Loading required package: lattice
    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
    ==========================================

    Also, I made a symbolic link for the file libclntsh.so.11.1, but it does not work.

    I am still experiencing the same problem. Do you think there're any alternatives to go through for me?

    Regards,
    Sean
  • 3. Re: Rstudio Error for loading library ORE
    Sherry LaMonica Journeyer
    Currently Being Moderated
    Follow these steps to install RStudio Server for use with Oracle R Enterprise:

    Create configuration files rserver.conf and .Renviron so necessary environment variables are recognized in the RStudio environment.

    Create rserver.conf:

    sudo vi /etc/rstudio/server.conf
    rsession-ld-library-path=R_HOME:ORACLE_HOME
    A typical value for R_HOME is /usr/lib64/R/lib; a typical value for ORACLE_HOME is /u01/app/oracle/product/11.2.0/dbhome_1/lib.

    Include ORACLE_HOME, ORACLE_HOSTNAME, ORACLE_SID in .Renviron using the bash shell:

    cd /home/oracle
    sudo vi .Renviron
    ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
    ORACLE_HOSTNAME=localhost
    ORACLE_SID=orcl

    export ORACLE_HOME
    export ORACLE_HOSTNAME
    export ORACLE_SID

    Edited by: Sherry LaMonica on Feb 1, 2013 4:46 PM
  • 4. Re: Rstudio Error for loading library ORE
    988674 Newbie
    Currently Being Moderated
    Unfortunately I have the exact same issue (using RStudio Server and Oracle R Enteprise on Oracle Linux 64).
    I have followed the instructions above, but the error still persist.

    Any idea?
  • 5. Re: Rstudio Error for loading library ORE
    Sherry LaMonica Journeyer
    Currently Being Moderated
    Try restarting the RStudio Server server using

    rstudio-server restart

    Then start RStudio Server in a fresh web browser session.

    If this does not resolve the problem, please paste the value you passed to 'rsession-ld-library-path' in rserver.conf.

    Thanks,

    Sherry
  • 6. Re: Rstudio Error for loading library ORE
    988674 Newbie
    Currently Being Moderated
    Sorry, figured it out. I have copied the R_HOME value from your earlier comment which has a typo in it (/usr/lib4 instead of lib64)

    "A typical value for R_HOME is /usr/lib4/R/lib; a typical value for ORACLE_HOME is /u01/app/oracle/product/11.2.0/dbhome_1/lib."
  • 7. Re: Rstudio Error for loading library ORE
    Sherry LaMonica Journeyer
    Currently Being Moderated
    Thank you. I've updated the original post to:

    "A typical value for R_HOME is /usr/lib64/R/lib; a typical value for ORACLE_HOME is /u01/app/oracle/product/11.2.0/dbhome_1/lib."

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points