I can't install Dplyr dev version and Rlang dev version on Windows 10

Hi All,

I can't install dplyr dev version (there is a new function across()) which requires installing dev version of rlang. I received this eror: rlang_0.4.2.9000.tar.gz’ had non-zero exit status, and rlang does not have a namespace. So I installed rlang from Cran, so the next error was:
Error in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
(converted from warning) problem copying C:\Program Files\R\R-3.6.2\library\00LOCK-rlang\rlang\libs\x64\rlang.dll to C:\Program Files\R\R-3.6.2\library\rlang\libs\x64\rlang.dll: Permission denied.

Removing \00LOCK-rlang folder results in "rlang does not have a namespace" error. So this looks like vicious circle.

I have got Rtools 3.5 version installed and R v.3.6.2 as well, RStudio v. 1.2.5034.

Any help would be greatly appreciated. Thanks.

Are you trying to install from a file? Please show the installation method or commands you are using.
Try deleting the rlang folder, reset your R session and try to install again, if it's not successfull, please post the whole error message you are getting.

Is it possible to install development version of dplyr or rlang from a file ?

I tried to install this way: devtools::install_github("tidyverse/dplyr")

I deleted dplyr and rlang folders from library, it did not help.

When I install Cran versions, there is no problem.

Kind of, you can clone the repo and install from a path

Can you post the whole error message you get when you try to install rlang from source? (make sure you are running rstudio as administrator or that you have proper write permissions) Right now there is no evident cause, so we need more details.

Hi @andresrcs,

  1. Could you please show me how to do it ?

  2. I wil try to send all my errors I got.

I think we should try first with a regular GitHub install (I don't think it makes any difference with cloning the repo locally), just post the whole error message you get when running

remotes::install_github("r-lib/rlang")

This is when it stops:

Error in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
(converted from warning) problem copying C:\Program Files\R\R-3.6.2\library\00LOCK-rlang\rlang\libs\x64\rlang.dll to C:\Program Files\R\R-3.6.2\library\rlang\libs\x64\rlang.dll: Permission denied.

That is not telling us nothing new, please post the whole message.

@andresrcs

Here you are:

─  preparing 'rlang': (1.1s)
✓  checking DESCRIPTION meta-information ... 
─  cleaning src
─  installing the package to process help pages (1s)
─  cleaning src (23.1s)
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building 'rlang_0.4.2.9000.tar.gz'
   
Error in loadNamespace(name) : there is no package called 'rlang'
Calls: options ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
Error: Failed to install 'rlang' from GitHub:
  (converted from warning) installation of package ‘C:/Users/XXXX/AppData/Local/Temp/xxxx/filexxxx/rlang_0.4.2.9000.tar.gz’ had non-zero exit status
Run `rlang::last_error()` to see where the error occurred.


>rlang::last_error()
error/rlang_error>
Failed to install 'rlang' from GitHub:
  (converted from warning) installation of package ‘C:/Users/xxxx /AppData/Local/Temp/xxxx/filexxxxx/rlang_0.4.2.9000.tar.gz’ had non-zero exit status
Backtrace:
 1. remotes::install_github("r-lib/rlang")
 2. remotes:::install_remotes(...)
 3. base::tryCatch(...)
 4. base:::tryCatchList(expr, classes, parentenv, handlers)
 5. base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
 6. value[[3L]](cond)
Run `rlang::last_trace()` to see the full context.

>rlang::last_trace()
Backtrace:
    x
 1. \-remotes::install_github("r-lib/rlang")
 2.   \-remotes:::install_remotes(...)
 3.     \-base::tryCatch(...)
 4.       \-base:::tryCatchList(expr, classes, parentenv, handlers)
 5.         \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
 6.           \-value[[3L]](cond)
<parent: error/install_error>
Failed to install 'rlang' from GitHub:
  (converted from warning) installation of package ‘C:/Users/xxxx/AppData/Local/Temp/xxxxx/filexxxxx/rlang_0.4.2.9000.tar.gz’ had non-zero exit status

Now, when I install rlang from Cran, there is no error about namespace anymore, but when I try to install dev version afterwards, it stops where Permission denied error appears again. Deleting lock-rlang folder or rlang folder itself can't help as well.

Is this a sanitized version of your actual user name? Does your actual username include empty spaces or non-ASCII characters, I think that could be the reason, R doesn't like non-syntactic user names.
I just installed rlang from GitHub on a Windows 10 machine R 3.6.2 Rtools 3.5 without any issues.

Yes, this is sanitized version of user name, but user name hasn't got any empty spaces or non-ASCII characters.

Sorry, I can't reproduce your problem or think in other possible cause, I hope someone else has another idea of what could be going on here.

Edit: the last thing I can think of, is to install the CRAN version first, restart your R session and try to install the GitHub version afterward (all this with RStudio running as administrator).

@andresrcs

Thank you very much indeed for your help.
That must be somehow an issue with my laptop. When I installed rlang (dev github version) on a Windows 10, R 3.6.2, Rtools 3.5 (my second laptop) everything went smoothly. So as a temporary solution I copied following libraries (all up-to-date dev versions): tidyr, tidyselect, rlang, dplyr, tibble, vctrs from my second laptop and pasted it into my first laptop. Now it works like a charm.

Thank you and Merry Christmas.

Messages like “permission denied” typically indicate that you have the package loaded in the current or another R session, and the solution is to close all open instances of R.

Thank you @hadley,

I found another solution as well - regarding “permission denied” error. When I created folder outside R "library" (default) folder (usually it is c:\Program Files\R\R-3.6.2\library\), it started working. So now I can install dev versions to folder e.g. c:\Program Files\R\R-3.6.2\myR_other_library\ using following command:

devtools::install_github("tidyverse/dplyr", lib = "C:/Program Files/R/R-3.6.2/myR_other_library")

and I am able to instal dev versions of packages without any hassle.

I don’t think that will help you in the long run - installing to non-standard libraries like that can cause other problems, and once you start loading packages from that library, you’re likely to run into the same problem again.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.