问题
I am developing a package using Rcpp and another third party C++ library. When I tried to install the package, I got
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object 'C:/Users/Admin/Documents/R/win-library/2.15/packagename/libs/i386/package.dll':
LoadLibrary failure: The specified module could not be found.
In 32-bit Windows OS, following an advice from my colleague, I fixed the problem by adding location of following dlls from MingW to system path.
libgcc_s_dw2-1.dll
But 64-bit Windows, I get the same error even with the dll although I am using 32-bit R.
So my question:
Is there any way to know why The specified module could not be found
error occurs? I mean I would like to know which module is missing. Maybe verbose option some where?
回答1:
There is not an easy way in R to get more information from the error I mentioned. But I found free software to find which dependency the dill is missing by following web site: http://www.dependencywalker.com/
Using the software I was able to find following dlls are needed to be in system path.
GPSVC.dll
IESHIMS.dll
SYSNIFY.dll
回答2:
As hinted by the post Win 7, 64 bit, dll problems, the output of dependencywalker may be misleading. In my case, the path to "Microsoft SQL Server" was missing in my system %PATH% environment variable (deliberately removed, because it seemed unnecessary). After that the LoadLibrary error vanished and the library loaded.
回答3:
I belive you can Run you R software as Administrator you can solve your problem... You may check: Unable to load any package in R (unable to load shared object)
回答4:
I ran into this same problem and the issue turned out to be that Windows was not looking in the right place for jvm.dll. Solution was to add location of this dll to Windows PATH variable.
Found solution here: Using the rJava package on Win7 64 bit with R
Instructions on how to edit PATH variable here: https://www.java.com/en/download/help/path.xml
回答5:
I was also facing the error
"Warning in install.packages : installation of package ‘rlang’ had non-zero exit status".
I followed the following steps
- restart the RStudio,
- install.packages("tidyverse")
- removed the folder
C:/Users/CHILIKA/Documents/R/win-library/3.5/00LOCK-rlang
and again
- install.packages("rlang") then rlang sucessfully installed.
来源:https://stackoverflow.com/questions/13497222/the-specified-module-could-not-be-found-in-r