dmurdoch/rgl

DLL loading issue for rgl on windows

denn0002 opened this issue · 4 comments

  • rgl Version: 0.106.8
  • R Version: 4.0.2
  • Platform: Windows 10 Enterprise 64 bit on Dell OptiPlex 7070

Attempting to load rgl as it is required for the 3DKUD package. Never had this error before, tried to install in numerous ways but always returns the same error. Not sure if this is to do with the package or my system. Any help is much appreciated.

Below is just through attempting to load after installing through cran

library("rgl")
Error: package or namespace load failed for ‘rgl’:
.onLoad failed in loadNamespace() for 'rgl', details:
call: getDLLRegisteredRoutines.character(dynlib, addNames = FALSE)
error: No DLL currently loaded with name or path ‘\usercd/d/denn0002/Documents/R/win-library/4.0/rgl/libs/x64/rgl.dll’
In addition: Warning message:
package ‘rgl’ was built under R version 4.0.5

Sometimes anti-virus software interferes with installations on Windows. Other than that, I can't suggest anything specific: I have a Win 10 system, and the CRAN version works for me.

If you can't work this out, you can try the suggestion in my second message in issue #109 , but I'm not sure it will help if the rgl DLL can't load.

Does the file mentioned in the error message, i.e. \usercd/d/denn0002/Documents/R/win-library/4.0/rgl/libs/x64/rgl.dll exist on your system?

That path looks kind of weird, not exactly a network share or a regular DOS style path.

If the file doesn't exist, what is the path to rgl.dll, if there is a copy somewhere else?

Thanks for the response.

Yes the file exists with the same path. This is on a university computer system so not sure if that will make the path look weird?

Tried installing from source and downloading the file from CRAN manually to try using; options(rgl.useNULL = TRUE), however still comes up with the same error.

If I install from CRAN through R, it installs but when I call library(rgl) after running options(rgl.useNULL = TRUE), it again returns;

Error: package or namespace load failed for ‘rgl’:
.onLoad failed in loadNamespace() for 'rgl', details:
call: getDLLRegisteredRoutines.character(dynlib, addNames = FALSE)
error: No DLL currently loaded with name or path ‘\usercd/d/denn0002/Documents/R/win-library/4.0/rgl/libs/x64/rgl.dll’
In addition: Warning message:
package ‘rgl’ was built under R version 4.0.5

Turns out it was a permission issue related to the university servers.

Ended up making a new library in my onedrive and re-ordering the librarys in .libpath() so onedrive was the defult.

myPaths <- .libPaths()
myPaths <- c(myPaths, "New library path")
.libPaths(myPaths)
myPaths <- c(myPaths[3], myPaths[1], myPaths[2])
.libPaths(myPaths)