Error in inDL(x, as.logical(local), as.logical(now), …) : unable to load shared object

烈酒焚心 提交于 2020-06-17 14:51:46

问题


I'm having this error when trying to attach package tidyselect and when trying to call tidyselect::any_function.

The error happens in Rstudio or command line alike, in RStudio it is triggered as soon as I type: tidyselect:: , though ?tidyselect:: works fine and I can call the help of ?tidyselect::any_function.

This also works:

packageVersion("tidyselect") # [1] ‘0.2.4

It used to work, and I don't understand what changed, I just know package rjava has been installed, the admins might also have changed something.

First a popup says:

The procedure entry point R_ContinueUnwind could not be located in the dynamic link library R.dll

Then an Error is displayed in the console :

Error in inDL(x, as.logical(local), as.logical(now), ...) :

unable to load shared object '//edited_UNC_path.com/edited_path/tidyselect/libs/x64/tidyselect.dll':

LoadLibrary failure: The specified procedure could not be found.

The dll file exists :

file.exists('//edited_UNC_path.com/edited_path/tidyselect/libs/x64/tidyselect.dll') # [1] TRUE

config :

sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_3.3.1

Any idea how I can solve this ?


回答1:


I don't know why this event happens as I am currently facing the same problem. Anyways I can explain your solution.

32 vs 64 bits

Your system is 64 bits, as shown in your sessionInfo(). i386 architecture is for the older systems, in 32 bits (they can only handle a limited amount of memory as they use 32 bits memory addresses, while 64 bits systems are, virtually, unlimited today).

What happens in R

A classic installation in R is "multiarch" for multi-architectures, which means 32 and 64 bits. In 64 bits systems there is no problem in building a 32 bits software. However, your may not have all the dependencies (e.g. C++ libraries) installed for both architectures. There is apparently a problem with your 32 bits installation. Then installing the package with INSTALL_opts="--no-multiarch" only installs the 64 bits version (the one you need), without problems.




回答2:


This was solved by reinstalling tidyselect using :

install.packages("tidyselect",INSTALL_opts="--no-multiarch")

(Although the package could be install with install.packages("tidyselect") without error.

This answer pointed me to the solution (totally different question though).

It seems that it was indeed an issue with rjava.

Quoting the linked answer:

the solution was to use install option that simply forgets about i386 architecture. (also works with drat library and packages not from CRAN

It's all Chinese to me though and ?utils::install.packages doesn't help, I'll happily upvote / accept an answer that explains what's going on.



来源:https://stackoverflow.com/questions/52150491/error-in-indlx-as-logicallocal-as-logicalnow-unable-to-load-share

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!