skip to Main Content

I am trying to in stall ROracle in a Linux machine. The Oracle client is installed and set up. However, when I try to install ROracle, I am getting error. Steps I have followed so far:

Install the oracle client:

oracle-instantclient19.6-sqlplus-19.6.0.0.0-1.i386 
oracle-instantclient19.6-devel-19.6.0.0.0-1.i386
oracle-instantclient19.6-basic-19.6.0.0.0-1.i386
oracle-instantclient19.6-odbc-19.6.0.0.0-1.i386
oracle-instantclient19.6-jdbc-19.6.0.0.0-1.i386
oracle-instantclient19.6-tools-19.6.0.0.0-1.i386

Checked if the libclntsh.so is linked with libclntsh.so.11.1. Set the lib path in the LD_LIBRARY_PATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64:/usr/lib/oracle/19.6/client/lib/

Ran the installation script:

R CMD INSTALL --configure-args='--with-oci-lib=/usr/lib/oracle/19.6/client/lib/ --with-oci- 
inc=/usr/include/oracle/19.6/client' ROracle_1.3-1.tar.gz

I am getting the below error:

* installing to library ‘/opt/wolf_workspace/R_Libraries’
* installing *source* package ‘ROracle’ ...
** package ‘ROracle’ successfully unpacked and MD5 sums checked
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -I/opt/R/3.3.3/lib/R/include -DNDEBUG -I/usr/include/oracle/19.6/client -I/usr/local/include -fpic -g -O2 -c rodbi.c -o rodbi.o
gcc -I/opt/R/3.3.3/lib/R/include -DNDEBUG -I/usr/include/oracle/19.6/client -I/usr/local/include -fpic -g -O2 -c rooci.c -o rooci.o
gcc -shared -L/opt/R/3.3.3/lib/R/lib -L/usr/local/lib -o ROracle.so rodbi.o rooci.o -L/usr/lib/oracle/19.6/client/lib/ -lclntsh -L/opt/R/3.3.3/lib/R/lib -lR
/usr/bin/ld: skipping incompatible /usr/lib/oracle/19.6/client/lib//libclntsh.so when searching for -lclntsh
/usr/bin/ld: cannot find -lclntsh
collect2: error: ld returned 1 exit status
make: *** [/opt/R/3.3.3/lib/R/share/make/shlib.mk:6: ROracle.so] Error 1
ERROR: compilation failed for package ‘ROracle’
* removing ‘/opt/wolf_workspace/R_Libraries/ROracle’

I am trying to set this up on R 3.3.3 and Linux Redhat/Centos 8. Any help would be really appreciated.

2

Answers


  1. For ROracle only need the Basic (or smaller Basic Light) and the SDK packages. The others aren’t needed.

    To echo the existing comment, you most probably need the 64-bit versions, but you have installed the 32-bit versions.

    Since you are installing RPM packages (not ZIPs) you don’t need to set LD_LIBRARY_PATH, since the RPM install does the equivalent for you.

    The latest ROracle is on https://www.oracle.com/database/technologies/roracle-downloads.html not CRAN (due to some CRAN issues)

    Login or Signup to reply.
  2. Same clntsh problem here, even with x64 Basic Light and SDK packages.

    I was trying ROracle_1.3-1.1.tar.gz from CRAN

    With ROracle_1.3-2_R_x86_64-linux-gnu.tar.gz from Oracle the INSTALL command worked great.

    LD_LIBRARY_PATH=/usr/lib/oracle/21/client64/lib:...
    OCI_LIB=/opt/oracle/instantclient_21_4
    
    $ R CMD INSTALL ROracle_1.3-2_R_x86_64-linux-gnu.tar.gz
    * installing to library ‘/usr/local/lib/R/site-library’
    * installing *binary* package ‘ROracle’ ...
    * DONE (ROracle)
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search