![](/img/trans.png)
[英]Error in Installing ROracle: LoadLibrary failure: The specified module could not be found
[英]ROracle LoadLibrary Failure: The Specified Module could not be found
在過去的幾天里,我一直試圖在我的 Win 10 VM 上安裝 ROracle,但我嘗試過的任何方法都不起作用。 當前安裝的工具和軟件是:
R 4.1.3
RStudio 2022.02.0+443 RTools 4.0.1.0
即時客戶端_12_1
DBI
到目前為止我嘗試過的事情:
通過 CRAN 安裝 - 使用內置安裝程序安裝到我的庫位置。 編輯 OCI_LIB64 和 PATH 以包含即時客戶端位置。 Rprofile.site 文件已更新為指向庫位置。
手動下載 ROracle zip 文件並手動移動到庫位置。 只能對舊版本的 ROracle 執行此操作,因為我無法找到最新版本 (1.3-1.1) 的 zip 文件。
已嘗試使用舊版本的 R3.6.3 和 RTools35 進行上述操作。
加載時一切都失敗了。 我不知道還能做什么...下面是我嘗試通過 CRAN 安裝所有最新軟件版本時看到的內容。
R version 4.1.3 (2022-03-10) -- "One Push-Up"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(DBI, lib.loc = "P:/OPT/R/Library")
> install.packages("ROracle", lib="P:/OPT/R/Library")
Package which is only available in source form, and may need
compilation of C/C++/Fortran: ‘ROracle’
installing the source package ‘ROracle’
trying URL 'https://cran.rstudio.com/src/contrib/ROracle_1.3-1.1.tar.gz'
Content type 'application/x-gzip' length 314510 bytes (307 KB)
downloaded 307 KB
* installing *source* package 'ROracle' ...
** package 'ROracle' successfully unpacked and MD5 sums checked
** using staged installation
P:/OPT/instantclient_12_1/genezi.exe: error while loading shared libraries: MSVCR100.dll: cannot open shared object file: No such file or directory
P:/OPT/instantclient_12_1/genezi.exe: error while loading shared libraries: MSVCR100.dll: cannot open shared object file: No such file or directory
./configure.win: line 55: [: too many arguments
./configure.win: line 63: [: too many arguments
Oracle
found Instant Client P:\OPT\instantclient_12_1
found Instant Client SDK P:\OPT\instantclient_12_1/sdk/include
copying from P:\OPT\instantclient_12_1/sdk/include
** libs
Warning: this package has a non-empty 'configure.win' file,
so building only the main architecture
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-EB9D~1.3/include" -DNDEBUG -I./oci -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c rodbi.c -o rodbi.o
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-EB9D~1.3/include" -DNDEBUG -I./oci -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c rooci.c -o rooci.o
/mingw64/bin/gcc -shared -s -static-libgcc -o ROracle.dll tmp.def rodbi.o rooci.o P:\OPT\instantclient_12_1/oci.dll -LC:/PROGRA~1/R/R-EB9D~1.3/bin/x64 -lR
installing to P:/OPT/R/Library/00LOCK-ROracle/00new/ROracle/libs/x64
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'ROracle'
finding HTML links ... done
ExtDriver-class html
OraConnection-class html
OraDriver-class html
OraResult-class html
Oracle html
dbCommit-methods html
dbConnect-methods html
dbDriver-methods html
dbGetInfo-methods html
dbListConnections-methods html
dbReadTable-methods html
dbSendQuery-methods html
fetch-methods html
summary-methods html
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for 'ROracle' in inDL(x, as.logical(local), as.logical(now), ...):
unable to load shared object 'P:/OPT/R/Library/00LOCK-ROracle/00new/ROracle/libs/x64/ROracle.dll':
LoadLibrary failure: The specified module could not be found.
Error: loading failed
Execution halted
ERROR: loading failed
* removing 'P:/OPT/R/Library/ROracle'
Warning in install.packages :
installation of package ‘ROracle’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Administrator\AppData\Local\Temp\RtmpQXFA09\downloaded_packages’
通過將 Instantclient 升級到最新版本並將 P:\Oracle\OPT\instantclient_21_3\sdk\include 中每個文件的權限更改為 unblocked 解決了該問題。 重新運行安裝程序向導並將其安裝到標准位置(不是我正在使用的網絡共享)並且它通過了。 用一些時間檢查代碼對其進行了測試,一切正常。 希望感謝 ROracle 軟件包安裝失敗以及用戶 obrl_soil 和 Eric Moffett 鼓勵我更改所有文件設置。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.