1

I am trying to install package performance development version with devtools but am getting this error:

> devtools::install_github("easystats/performance")
Downloading GitHub repo easystats/performance@HEAD
Error: Failed to install 'performance' from GitHub:
  create process 'C:/PROGRA~1/R/R-40~1.3/bin/x64/Rcmd.exe' (system error 267, The directory name is invalid.
) @win/processx.c:1040 (processx_exec)

Same thing with alternative remotes command:

> remotes::install_github("easystats/performance")
Downloading GitHub repo easystats/performance@HEAD
Error: Failed to install 'performance' from GitHub:
  create process 'C:/PROGRA~1/R/R-40~1.3/bin/x64/Rcmd.exe' (system error 267, The directory name is invalid.
) @win/processx.c:1040 (processx_exec)

Edit: Note that I am getting the same error no matter what package I've tried to install through devtools (e.g., cardiomoon/processR or r-lib/crayon). This started to happen suddenly a few weeks ago yet never had this issue before. So it seems not related to the package but to something else.

So I tried changing my default library to the simplest ever location that doesn't have any special characters or require any admin rights, with those instructions. I can confirm that C:/Rpackages is now indeed my default library path, and that it is first (on the left):

> .libPaths()
[1] "C:/Rpackages"                      "C:/Program Files/R/R-4.0.3/library"

However, I am still getting the same error. The weird thing is that the error still seems to refer to the second library path rather than the first one, which seems off to me. From the help documentation, I don't see how to specify the library location explicitly for neither devtools nor remotes. Also interesting, notice that the error seems to mention R-40~1.3 instead of R-4.0.3 as it should(?). Might this be the issue? Then how to fix?

I also tried reinstalling devtools and remotes, to no avail.

Yet, it works if I install the regular CRAN version:

> install.packages("performance")
Installing package into ‘C:/Rpackages’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/performance_0.7.2.zip'
Content type 'application/zip' length 2487172 bytes (2.4 MB)
downloaded 2.4 MB

package ‘performance’ successfully unpacked and MD5 sums checked

Here my session info if useful:

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

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

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

loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3    yaml_2.2.1    
rempsyc
  • 785
  • 5
  • 24
  • "So I tried changing my default library to the simplest ever location that doesn't have any special characters" space is a special character – Hong Ooi Jun 07 '21 at 15:59
  • Good point @Hong Ooi ... but "C:/Program Files" is as well and normally spaces don't produce errors when installing packages? That being said, I tried removing the space and same error :P Edited my question to reflect this. – rempsyc Jun 07 '21 at 16:37
  • 1
    Does this only happen with the `performance` package or do other packages from github install without an error? You also try to force the library location like this: `remotes::install_github("easystats/performance", lib = "C:/Rpackages")`. – Till Jun 07 '21 at 18:33
  • Good point @Till! I am also experiencing the same issue trying to install `cardiomoon/processR` and `r-lib/crayon`. This started to happen suddenly a few weeks ago yet never had this issue before. So it seems not related to the package but to something else. I have edited my question to reflect this better. Yet, I've tried reinstalling `devtools` and `remotes`. Would you suggest attempting to reinstall Rstudio or R then? – rempsyc Jun 08 '21 at 14:25
  • @Till forgot to mention that even when specify `lib` I'm still getting the error. I'm starting to think that it might not be related to the location of the library but to some sort of Windows process. Indeed, I ended up reinstalling Rtools, R, and Rstudio, and still experiencing this error. So at this point I wonder if it is not more of a Windows problem (e.g., with Environment variables?). – rempsyc Jun 14 '21 at 17:03
  • 1
    Hi, I had the same error. I just gonna link the solution [here](https://stackoverflow.com/questions/68400661/r-unable-to-install-packages-from-github-system-error-267-win-processx-c1040/68408378#68408378): https://stackoverflow.com/questions/68400661/r-unable-to-install-packages-from-github-system-error-267-win-processx-c1040/68408378#68408378 for other people searching for this. In the hope it helps – Björn Jul 19 '21 at 06:59

1 Answers1

1

The issue was with the processx package and the development version has since received a fix (in version v3.5.3). Please see the following discussion for more info: https://github.com/r-lib/processx/issues/313

rempsyc
  • 785
  • 5
  • 24