How to make OCI lib work on a red machine with R Oracle?

I need the OCI lib to work on my rhel 6.3 computer, and I am experiencing some problems with OCI header files that cannot be found. I installed (using yum install)

oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm

because this official page is all I need to run OCI. To test all of this in general, I installed sqplus64, which worked after I set export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib . Unfortunately, the header files were not found after setting LD_LIBRARY_PATH . I'm actually not surprised because there is no include directory in any of these oracle paths.

So the question is: where can I get these missing header files from? Do they actually already exist and can I just find them?

Btw: I am doing all this exercise because I want to use ROracle on my R Studio server, and this R package depends on the OCI library. As soon as I return to territory R, ​​the road becomes much less bumpy for me.

EDIT: this documentation helped me a bit further. However, I think I found some header files now: "/usr/include/oracle/11.2/client64". But which variable do I need to set for this location?

+4
source share
2 answers

Ladies and gentlemen, the solution is:

 $ ./configure --with-oracle-headers-path=/usr/include/oracle/11.2/client64/ --with-oracle-lib-path=/usr/lib/oracle/11.2/client64/lib/ $ make $ make install 

At least this is error-free compilation. Now let me turn to the R package itself:

 $ export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib:$LD_LIBRARY_PATH $ R CMD INSTALL ROracle_1.1-7.tar.gz 

Details can be found here .

+2
source
 yum install --nogpgcheck oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm 
  1. Now set ROracle by specifying the environment variables LD_LIBRARY_PATH , OCI_LIB and OCI_INC (for example, in a document ):
 LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib:$LD_LIBRARY_PATH OCI_LIB=/usr/lib/oracle/12.1/client64/lib OCI_INC=/usr/include/oracle/12.1/client64 R -e 'install.packages("ROracle", repos="http://cloud.r-project.org");' 
+2
source

All Articles