I'm trying to install ROracle package on my Windows 7 client. I have Oracle Instant client and Rtools installed, DBI package is istalled, OCI32_LIB environmental variable has been set. But when I try to install from command line:
C:\Temp>R CMD INSTALL --build ROracle_1.1-10.tar.gz
* installing to library 'C:/Users/myaccount/Documents/R/win-library/3.0'
* installing *source* package 'ROracle' ...
** package 'ROracle' successfully unpacked and MD5 sums checked
ERROR: configuration failed for package 'ROracle'
* removing 'C:/Users/myaccount/Documents/R/win-library/3.0/ROracle'
C:\Temp>
When I try to install from source:
> install.packages("ROracle",type = "source")
Warning in install.packages :
package ‘ROracle’ is not available (for R version 3.0.0)
Installing package into ‘C:/Users/myaccount/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
trying URL 'http://cran.at.r-project.org/src/contrib/ROracle_1.1-10.tar.gz'
Content type 'application/x-gzip' length 168193 bytes (164 Kb)
opened URL
downloaded 164 Kb
* installing *source* package 'ROracle' ...
** package 'ROracle' successfully unpacked and MD5 sums checked
ERROR: configuration failed for package 'ROracle'
* removing 'C:/Users/myaccount/Documents/R/win-library/3.0/ROracle'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-30~1.0/bin/i386/R" CMD INSTALL -l "C:\Users\myaccount\Documents\R\win-library\3.0" C:\Users\myaccount\AppData\Local\Temp\RtmpGggbyp/downloaded_packages/ROracle_1.1-10.tar.gz' had status 1
Warning in install.packages :
installation of package ‘ROracle’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\myaccount\AppData\Local\Temp\RtmpGggbyp\downloaded_packages’
What should I do, how to proceed?
Along with the 'Basic Package' and the 'ODBC Package', with Oracle 11g, you should copy unpacked files from the 'SDK package' into the subdirectory
instantclient_11_2
. In this case, you will not need to define the environment variableSys.setenv (OCI_INC = "...")
.I had this exact problem as well, including the OCI_INC error. They actually talk about it in the INSTALL file in the .tar.gz package, you can read more there.
You have to set the
OCI_INC
variable to theinclude
directory like this:Or whereever your file is. Here was my complete setup to get things installed from an Admin privileged command line.
Also, make sure to change
client_2
toclient_1
andOCI_LIB64
toOCI_LIB32
if you are trying to do a 32-bit install.I had a similar error when trying to install ROracle from source.1
After searching around a bit I had to undertake what others have mentioned as well as redownloading the tar.gz. When I double checked the download size it was 10KB instead of 234KB.
Updated the following Environmental Varibles in windows
SET PATH=C:\Rtools\bin;C:\Rtools\gcc-4.6.3;%PATH% SET OCI_INC=C:\Oracle_11G_ClientR2\product\11.2.0\client_1\oci\include SET OCI_LIB32=C:\Oracle_11G_ClientR2\product\11.2.0\client_1\BIN SET OCI_LIB64=C:\Oracle_11G_ClientR2\product\11.2.0\client_1\BIN R CMD INSTALL --build "C:\temp\ROracle_1.1-12.tar.gz"
Output should look like the following:
1 Here is what the previous error looked like:
I had exactly this problem. It was caused because when installing RTools I did not check the 'edit PATH' checkbox. I uninstalled RTools and reinstalled it again, this time making sure the checkbox was checked, and it worked first time! Hope this helps.
From http://jgilfillan.github.io/2016/05/28/how-to-install-roracle-in-windows-7/
Download binary from oracle: http://www.oracle.com/technetwork/database/database-technologies/r/roracle/downloads/index.html
The run the following command in r, substituting the file path:
Then load the library and use the package - you may have to change XXXX to whatever is in your TNS Names:
test connection:
Note that this has also been confirmed to work on Windows 10.
After following the steps (highlighted in red boxes). I also ran commands below on R. So, everything went through well on a Windows 7 64-bit, R 3.4 64bit environment.