ROracle安装
ROracle install
我无法将 ROracle 包下载到我的计算机上 运行。我有 windows 10 和 R 3.5.1(它适用于 windows 7)。
第一次尝试:
install.packages("ROracle")
Installing package into
‘C:/Users/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Package which is only available in source form, and may need compilation of
C/C++/Fortran: ‘ROracle’
These will not be installed
我按照这里的说明直接从Oracle下载的
How to install ROracle package on Windows 7?
我也查看了这些网站,但这些建议也不起作用。
how to install r package for oracle on windows 10 64 bit
setwd("C:\Users\Downloads")
install.packages('ROracle_1.3-1.zip', repos = NULL)
Installing package into ‘C:/Users/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
package ‘ROracle’ successfully unpacked and MD5 sums checked
library(ROracle)
Error: package or namespace load failed for ‘ROracle’:
package ‘ROracle’ was installed by an R version with different internals; it
needs to be reinstalled for use with this R version
我的机器上有 mysql 和 sqldeveloper。任何帮助,将不胜感激。
下载 ROracle、Instant Client 和 R 的兼容版本
可以从下面的 link 下载最新版本的 RTools
重要links:
Instant Client Version (12.2):下载基础版和sdk版本的即时客户端
http://www.oracle.com/technetwork/database/features/instant-client/
R for Windows(查找 R for Windows 的先前版本)
https://cran.rstudio.com/bin/windows/base/old/
https://cran.rstudio.com/bin/windows/base/old/3.6.1/R-3.6.1-win.exe
RTools (RTools35)
https://cran.r-project.org/bin/windows/Rtools/
ROracle(ROracle-1.3.2兼容R3.6.0及以上版本)
https://www.oracle.com/database/technologies/roracle-downloads.html
对于 ROracle 故障排除非常重要 link:https://cran.cnr.berkeley.edu/web/packages/ROracle/INSTALL
RStudio
在控制面板 > 系统和安全 > 系统 > 高级系统设置> 在系统属性中,单击 "Environment Variables"> 在系统变量中设置以下环境变量:
ORACLE_HOME = 'C:/oreclient_install_dir/instantclient_12_2'
OCI_INC = 'C:/oreclient_install_dir/instantclient_12_2/sdk/include'
OCI_LIB64 = 'C:/oreclient_install_dir/instantclient_12_2'
TNS_ADMIN = 'C:/oreclient_install_dir/instantclient_12_2'
请看我已经安装了 64 位版本的 R,因此设置了相同的环境变量。如果您使用的是 32 位版本,请将 OCI_LIB32 设置为适当的路径。另外,将 TNS 文件放在适当的位置。
此外,将路径设置为包括:
C:\oreclient_install_dir\instantclient_12_2 <br/>
C:\app\client\pc_username\product.2.0\client_1
C:\app\client\pc_username\product.2.0\client_1\bin
C:\app\client\pc_username\product.2.0\client_1\Network\Admin
%PATH%
C:\R\R-3.6.0\bin
C:\R\Rtools\bin
C:\R\Rtools\mingw_64\bin
检查变量集的几个重要 R 命令:
R.home(component = "home")
Sys.getenv("PATH")
Sys.getenv("OCI_INC")
Sys.getenv("OCI_LIB64")
Sys.getenv("ORACLE_HOME")
Sys.getenv("TNS_ADMIN")
设置环境变量后请重新启动R,建议在运行ROracle命令时以运行R作为管理员。
install.packages("C:/ROracle/ROracle_1.3-2.tar.gz", repos = NULL)
您可能还需要安装 DBI 包
install.packages("DBI")
library("DBI")
library("ROracle")
我无法将 ROracle 包下载到我的计算机上 运行。我有 windows 10 和 R 3.5.1(它适用于 windows 7)。 第一次尝试:
install.packages("ROracle")
Installing package into
‘C:/Users/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Package which is only available in source form, and may need compilation of
C/C++/Fortran: ‘ROracle’
These will not be installed
我按照这里的说明直接从Oracle下载的 How to install ROracle package on Windows 7?
我也查看了这些网站,但这些建议也不起作用。
how to install r package for oracle on windows 10 64 bit
setwd("C:\Users\Downloads")
install.packages('ROracle_1.3-1.zip', repos = NULL)
Installing package into ‘C:/Users/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
package ‘ROracle’ successfully unpacked and MD5 sums checked
library(ROracle)
Error: package or namespace load failed for ‘ROracle’:
package ‘ROracle’ was installed by an R version with different internals; it
needs to be reinstalled for use with this R version
我的机器上有 mysql 和 sqldeveloper。任何帮助,将不胜感激。
可以从下面的 link 下载最新版本的 RTools
重要links: Instant Client Version (12.2):下载基础版和sdk版本的即时客户端 http://www.oracle.com/technetwork/database/features/instant-client/
R for Windows(查找 R for Windows 的先前版本) https://cran.rstudio.com/bin/windows/base/old/ https://cran.rstudio.com/bin/windows/base/old/3.6.1/R-3.6.1-win.exe
RTools (RTools35) https://cran.r-project.org/bin/windows/Rtools/
ROracle(ROracle-1.3.2兼容R3.6.0及以上版本) https://www.oracle.com/database/technologies/roracle-downloads.html 对于 ROracle 故障排除非常重要 link:https://cran.cnr.berkeley.edu/web/packages/ROracle/INSTALL
RStudio
在控制面板 > 系统和安全 > 系统 > 高级系统设置> 在系统属性中,单击 "Environment Variables"> 在系统变量中设置以下环境变量:
ORACLE_HOME = 'C:/oreclient_install_dir/instantclient_12_2'
OCI_INC = 'C:/oreclient_install_dir/instantclient_12_2/sdk/include'
OCI_LIB64 = 'C:/oreclient_install_dir/instantclient_12_2'
TNS_ADMIN = 'C:/oreclient_install_dir/instantclient_12_2'
请看我已经安装了 64 位版本的 R,因此设置了相同的环境变量。如果您使用的是 32 位版本,请将 OCI_LIB32 设置为适当的路径。另外,将 TNS 文件放在适当的位置。
此外,将路径设置为包括:
C:\oreclient_install_dir\instantclient_12_2 <br/>
C:\app\client\pc_username\product.2.0\client_1
C:\app\client\pc_username\product.2.0\client_1\bin
C:\app\client\pc_username\product.2.0\client_1\Network\Admin
%PATH%
C:\R\R-3.6.0\bin
C:\R\Rtools\bin
C:\R\Rtools\mingw_64\bin
检查变量集的几个重要 R 命令:
R.home(component = "home")
Sys.getenv("PATH")
Sys.getenv("OCI_INC")
Sys.getenv("OCI_LIB64")
Sys.getenv("ORACLE_HOME")
Sys.getenv("TNS_ADMIN")
设置环境变量后请重新启动R,建议在运行ROracle命令时以运行R作为管理员。
install.packages("C:/ROracle/ROracle_1.3-2.tar.gz", repos = NULL)
您可能还需要安装 DBI 包
install.packages("DBI")
library("DBI")
library("ROracle")