1

我正在尝试安装软件包performance开发版本,devtools但出现此错误:

> 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)

与替代remotes命令相同:

> 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)

编辑:请注意,无论我尝试通过什么软件包安装devtools(例如,cardiomoon/processRr-lib/crayon),我都会遇到相同的错误。几周前开始突然发生这种情况,但以前从未遇到过这个问题。所以它似乎与包装无关,而是与其他东西有关。

因此,我尝试使用这些说明将我的默认库更改为没有任何特殊字符或需要任何管理员权限的最简单的位置。我可以确认C:/Rpackages现在确实是我的默认库路径,并且它是第一个(在左侧):

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

但是,我仍然遇到同样的错误。奇怪的是,错误似乎仍然指的是第二个库路径,而不是第一个,这在我看来是不对的。从帮助文档中,我看不到如何为既不devtools也不明确指定库位置remotes。同样有趣的是,请注意该错误似乎是提及R-40~1.3而不是R-4.0.3应有的(?)。这可能是问题吗?那怎么修呢?

我也尝试重新安装devtoolsand remotes,但无济于事。

但是,如果我安装常规 CRAN 版本,它就可以工作:

> 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

如果有用的话,这里是我的会话信息:

> 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    
4

0 回答 0