Skip to content

Fails to install rlang DLL on Windows #131

Closed

Description

@yutannihilation

I saw this warning when I build rlang by the RStudio's build button on my local Windows:

installing to C:/Users/user1/Documents/R/win-library/3.5/rlang/libs/x64
Warning in file.copy(files, dest, overwrite = TRUE) :
  problem copying .\rlang.dll to C:\Users\user1\Documents\R\win-library\3.5\rlang\libs\x64\rlang.dll: Permission denied

This kind of "Permission denied" is a common error on Windows. Maybe this is because I'm using the DLL as the package is loaded, so, usually, restarting the R session will make things work. But, for rlang, it won't.

In my understanding, this is because devtools or remotes package imports rlang in their dependency chains. Can I install rlang cleanly on Windows?

Now I use the workaround bellow:

devtools::build('.')
# (restart R session)
install.packages("../rlang_0.x.x.tar.gz", repos = NULL)

Activity

  1. gaborcsardi commented on May 8, 2018

    @gaborcsardi
    Member

    remotes has no hard dependencies, so it should work I think. This should also work:

    source("https://install-github.me/r-lib/rlang")
    
  2. yutannihilation commented on May 8, 2018

    @yutannihilation
    ContributorAuthor

    Thanks. I meant, these two failed:

    • "build" on RStudio
    • devtools::install_github()

    I will try remotes::install_github() later.

  3. yutannihilation commented on May 8, 2018

    @yutannihilation
    ContributorAuthor

    Hi, I saw the same warning with remotes::install_github() on the fresh R session on RStudio. source("https://install-github.me/r-lib/rlang") succeeds, by the way.

    But, if I execute Rscript.exe' -e "remotes::install_github('tidyverse/rlang')" on PowerShell, the warning doesn't occur. So, I suspect RStudio is somehow involved here.

    However, if RStudio is the cause, why did I succeed with install.packages() or source() even when I'm on RStudio? I have no I idea... Do you think I should move this issue to RStudio's repo? Or, as the situation is very vague, should I ask on RStudio Community?

  4. gaborcsardi commented on May 8, 2018

    @gaborcsardi
    Member

    Basically the issue is if rlang is loaded in any R session. So even if it is not loaded in the current session, but it is loaded in another one, the installer will fail to update the DLL file.

    I don't think RStudio can do much about this. The devtools toolchain will have a better package installer soon, it will hopefully fix this issue.

  5. yutannihilation commented on May 8, 2018

    @yutannihilation
    ContributorAuthor

    I know. But, this time, RStudio is the only session I concsiously used. So, I suspect RStudio hooks something that needs rlang when the package is loaded by ::.

    To be clear, I'm not complaining about remotes, rlang, or RStudio because it's natural the packages or RStudio can't do this nice, as you wrote, if the DLL is used outside of the current session.

    Thanks for the good news about the new toolchain :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions