如何在Windows 10 64位上为Oracle安装R软件包 [英] how to install r package for oracle on windows 10 64 bit

查看:270
本文介绍了如何在Windows 10 64位上为Oracle安装R软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows 10上安装rpackage Roracle时,我此时陷入困境

while installing rpackage Roracle on windows 10 i'm getting stuck at this point


install.packages("ROracle")
Installing package into ‘C:/Users/admin/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
Package which is only available in source form, and may need compilation of C/C++/Fortran:
  ‘ROracle’
Do you want to attempt to install these from sources?
y/n: y
installing the source package ‘ROracle’

trying URL 'https://cran.rstudio.com/src/contrib/ROracle_1.3-1.tar.gz'
Content type 'application/x-gzip' length 308252 bytes (301 KB)
downloaded 301 KB

* installing *source* package 'ROracle' ...
** package 'ROracle' successfully unpacked and MD5 sums checked
ERROR: cannot find Oracle Client.
       Please set OCI_LIB64 to specify its location.
Warning: running command 'sh ./configure.win' had status 1
ERROR: configuration failed for package 'ROracle'
* removing 'C:/Users/admin/Documents/R/win-library/3.3/ROracle'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\admin\Documents\R\win-library\3.3" C:\Users\admin\AppData\Local\Temp\RtmpGYlz5L/downloaded_packages/ROracle_1.3-1.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\admin\AppData\Local\Temp\RtmpGYlz5L\downloaded_packages’

我已经安装了Rtools Rtools33.exe,我的R版本是version.string R版本3.3.2(2016-10-31) 请帮助将其与oracle 11g数据库连接

I've installed Rtools Rtools33.exe and my R version is version.string R version 3.3.2 (2016-10-31) please help to connect it with oracle 11g database

Oracle客户端安装在d驱动器中,该路径为: D:\ app \ admin \ product \ 11.2.0 \ client_1 \ BIN

Oracle client is intalled in d drive which path is: D:\app\admin\product\11.2.0\client_1\BIN

推荐答案

正如@Nathan Dobie所提到的,有关ROracle安装的说明对我有所帮助.我不需要Rtools.exe,但必须在环境变量中添加Oracle Instant Client.

As @Nathan Dobie mentionned, instructions on the ROracle installation were helpful for me. I didn't need Rtools.exe but i had to add oracle instant client in the Environment variables.

64位配置:

  • 在系统变量下,创建OCI_LIB64(如果尚不存在). 将OCI_LIB64的值设置为D:\ app \ admin \ product \ 11.2.0 \ client_1 \ BIN(在您的情况下)
  • 在系统变量下,编辑PATH以包括 D:\ app \ admin \ product \ 11.2.0 \ client_1 \ BIN
  • Under System variables, create OCI_LIB64 if it does not already exist. Set the value of OCI_LIB64 to D:\app\admin\product\11.2.0\client_1\BIN (in your case)
  • Under System variables, edit PATH to include D:\app\admin\product\11.2.0\client_1\BIN

您还需要使用以下值创建OCI_INC D:\ app \ admin \ product \ 11.2.0 \ client_1 \ oci \ include

And you will also need to create OCI_INC with the following value D:\app\admin\product\11.2.0\client_1\oci\include

对我来说非常好:-)

这篇关于如何在Windows 10 64位上为Oracle安装R软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆