ROracle.dll不是有效的Win32应用程序 [英] ROracle.dll is not a valid Win32 application

查看:362
本文介绍了ROracle.dll不是有效的Win32应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个和ROracle一样古老的故事...我似乎找不到解决此问题的方法.我已经卸载了JAVA,R和RTools,并仅使用64位版本重新安装了全部3个. ROracle的构建可以正常进行,但是在尝试加载程序包时出现以下错误消息.

It's a tale as old as ROracle... I just can't seem to find a solution to this problem. I've uninstalled JAVA, R, and RTools and reinstalled all 3 with only 64bit versions. The build for ROracle goes fine, but I get the following error message when trying to load the package.

我研究了其他一些没有成功的解决方案,并验证了64位Oracle Client安装.有想法吗?

I've looked at some of the other solutions without success and verified a 64 bit install of Oracle Client. Thoughts?

正在加载所需的程序包:DBI inDL(x,as.logical(local),as.logical(now),...)中的错误: 无法加载共享对象'C:/Program Files/R/R-3.3.2/library/ROracle /libs/x64/ROracle.dll': LoadLibrary失败:%1不是有效的Win32应用程序.

Loading required package: DBI Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'C:/Program Files/R/R-3.3.2/library/ROracle /libs/x64/ROracle.dll': LoadLibrary failure: %1 is not a valid Win32 application.

错误:"ROracle"的程序包或名称空间加载失败

Error: package or namespace load failed for ‘ROracle’

推荐答案

事实证明,IT部门推出了32位Oracle客户端构建而不是64位.如果收到此消息,则所有路径都是正确的,并且确定使用的是64位R/Java,然后尝试以32位模式进行构建.

Turned out that the IT department pushed a 32bit build of Oracle client instead of 64bit. If you get this message, all the paths are correct, and you're sure you are using 64 bit R/Java, then try building in 32bit mode.

这是给ROracle用户的礼物,以弥补这一愚蠢的帖子: 这是我为了方便该过程而在我的设施中传递的安装脚本,以为其他人可能会觉得有用.我们使用的是Windows 7,有些使用的是x64.所有人都在使用32位Oracle Client.

Here is a present to ROracle users to make up for this silly post: This is the install script I am passing around within my facility to facilitate the process, thought others might find it useful. We are using windows 7, some have x64. All are using 32bit Oracle Client.

# First install RTools w/ path modifications during the install
# Verify file paths
filePathofPackage <- "YOUR/FILE/PATH/ROracle_1.3-1.tar.gz"
if(Sys.getenv("R_ARCH") != "/i386") stop("Process must be run in 32bit version of R")
Sys.setenv(OCI_LIB32 = "C:\\Oracle\\product\\11.2.0\\client_1\\bin")
Sys.setenv(OCI_INC = "C:\\Oracle\\product\\11.2.0\\client_1\\oci\\include")
install.packages(filePathofPackage, repos = NULL, verbose = T, clean = T)

这篇关于ROracle.dll不是有效的Win32应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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