我知道有关此问题的其他问题,但它们与我的系统设置或我遇到的安装错误没有太多共同之处,因此:
我正在使用 Windows 7、64 位
我已经安装了 64 位 Oracle Instant Client 18.3.0.0.0 及其 sdk 和 odbc 扩展,可从http://www.oracle.com/technetwork/topics/winx64soft-089540.html获得
我已将安装位置“C:\Oracle\instantclient_18_3”放在 PATH 上。
我已经安装了 R 3.5.1 和 Rtools 3.5;两者都在 PATH 上。
在 R 中,
Sys.setenv(
'ORACLE_HOME' = 'C:/Oracle/instantclient_18_3',
'OCI_INC' = 'C:/Oracle/instantclient_18_3/sdk/include',
'OCI_LIB64' = 'C:/Oracle/instantclient_18_3'
)
install.packages("ROracle", type="source")
结果如下
* installing *source* package 'ROracle' ...
** package 'ROracle' successfully unpacked and MD5 sums checked
Oracle Client Shared Library 64-bit - 18.3.0.0.0 Operating in Instant Client mode.
found Oracle Client C:/Oracle/instantclient_18_3
found Oracle Client include C:/Oracle/instantclient_18_3/sdk/include
copying from C:/Oracle/instantclient_18_3/sdk/include
** libs
c:/Rtools/mingw_64/bin/gcc -I"C:/Program Files/R/R-3.5.1/include" -DNDEBUG -I./oci -O2 -Wall -std=gnu99 -mtune=generic -c rodbi.c -o rodbi.o
In file included from rooci.h:75:0,
from rodbi.c:181:
./oci/oci.h:716:20: fatal error: ociver.h: No such file or directory
#include <ociver.h>
^
compilation terminated.
make: *** [C:/Program Files/R/R-3.5.1/etc/x64/Makeconf:208: rodbi.o] Error 1
ERROR: compilation failed for package 'ROracle'
* removing 'C:/Users/obrienle/Documents/R/win-library/3.5/ROracle'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘ROracle’ had non-zero exit status
Rtools 找不到的文件 ociver.h 肯定存在于OCI_INC
文件夹中,所以我不知道为什么会这样。有人对尝试什么有任何想法吗?