Skip to content

getPkgZips() LoadLibrary error #35

Open

Description

@cebarboza

Hi @ariannaa7

From obesity #288 @laacri wrote:

When trying to run the study on IPCI, installing packages from renv/cellar worked fine, but at the moment of loading them into the environment we consistently got a LoadLibrary error as the following one:

install.packages(pkg_paths, repos = NULL, type = "win.binary")
Installing packages into ‘C:/Users/cditullio/AppData/Local/R/cache/R/renv/library/P4-C1-011-Capturing-obesity-1de0f507/windows/R-4.4/x86_64-w64-mingw32’
(as ‘lib’ is unspecified)
package ‘askpass’ successfully unpacked and MD5 sums checked
package ‘backports’ successfully unpacked and MD5 sums checked
package ‘bit’ successfully unpacked and MD5 sums checked
...

library(SqlRender)
Error: package or namespace load failed for ‘SqlRender’ in inDL(x, as.logical(local), as.logical(now), ...):
unable to load shared object 'C:/Users/cditullio/AppData/Local/R/cache/R/renv/library/P4-C1-011-Capturing-obesity-1de0f507/windows/R-4.4/x86_64-w64-mingw32/rlang/libs/x64/rlang.dll':
LoadLibrary failure: The specified procedure could not be found.

Activity

  1. ariannaa7 commented on Jun 4, 2026

    @ariannaa7
    Collaborator

    Hi @cebarboza I think this will require some more troubleshooting on the IPCI computer. I managed to successfully install the packages on the IPCI computer for a different study, so I will do some comparison when I am back in the office on Monday.

    The main issue with trying to use renv to restore is that some of the package versions specified in the renv.lock are not available for download as windows binaries, which is why this function then looks for an alternate package.

    Some of the things I've tried on the IPCI computer to get the install to work:

    • Changing the renv.lock (repo, R version, removing DarwinShinyModules, etc.)
    • Setting a renv cellar path and trying to override to ensure it looks to the zips first
    • Turning the zip directory into a local miniCRAN repository and directing the renv.lock to look there
    • First using renv::restore() on the local mirror and then using the zips to supplement whatever it wasn't able to download

    In the end, I had the most success with simply installing all the packages from the zips with install.packages() and then loading each package with library(). I believe that is what @laacri also tried here, so I will definitely have a look at it to see what can be changed.

  2. cebarboza commented on Jun 4, 2026

    @cebarboza
    MemberAuthor

    Just as a side note @ariannaa7:

    You mentioned that it was hard to install the tar file right? I just read from our friend AI that those are totally OS agnostic. The problem also with that is that it would mean installing everything from source an that may take forever.

    Maybe what renv does is that, when it cannot find the zip, it installs from source instead, maybe something to consider and we live with that, but at least we are sure that we will have the right version on IPCI. (Sorry if I am just repeated what we talked once)

    I guess when this is finished, Phds will also use this a lot.

  3. ariannaa7 commented on Jun 4, 2026

    @ariannaa7
    Collaborator

    Originally, I had downloaded the tar.gz files and those were not working well at all, but now maybe I can try again with the new things I've learned.

    I will say that a couple weeks ago when we were able to install the packages on the IPCi computer from the windows binaries that @laacri downloaded (unzipped), we were not able to install them on the IPCI computer the same way with the tar.gzs that were unzipped and extracted on Mac.

    I will try some new things in the office next week!

  4. cebarboza commented on Jun 4, 2026

    @cebarboza
    MemberAuthor

    Great. I like the zip approach really. Somehow feels solid and really fast. Probably the issue now is just to research what's the deal with the versions. Other than than I'm really looking forward to have one functions that anyone can use for our scenario.

    I will be on vacation, but generally I read ocassionally this boards so I don't loose track of things

  5. added
    enhancement
    on Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions