r-lib / pak

A fresh approach to package installation
https://pak.r-lib.org
671 stars 60 forks source link

failed to install packages with pak #575

Closed wtbxsjy closed 9 months ago

wtbxsjy commented 9 months ago

I am using R on Windows 10, but can't install any package with pak. The "install.packages" works well. for example, install liteq:

pak::pkg_install("liteq") 

→ Will install 1 package. → Will download 1 CRAN package (88.78 kB).

  • liteq 1.1.0 [dl] (88.78 kB) ℹ Getting 1 pkg (88.78 kB) ✔ Cached copy of liteq 1.1.0 (i386+x86_64-w64-mingw32) is the latest build ✔ No downloads needed, all packages are cached Error: ! error in pak subprocess Caused by error in process_initialize(self, private, command, args, stdin, stdout, …: ! Native call to processx_exec failed Caused by error in chain_call(c_processx_exec, command, c(command, args), pty, pty_options, …: ! Command '' not found @win/processx.c:982 (processx_exec) Type .Last.error to see the more details.

It seems to be the problem caused by processx, then I reinstall the processx with install.packages but the error is still there.

sessionInfo()

R version 4.3.2 (2023-10-31 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale: [1] LC_COLLATE=Chinese (Simplified)_China.utf8 [2] LC_CTYPE=Chinese (Simplified)_China.utf8 [3] LC_MONETARY=Chinese (Simplified)_China.utf8 [4] LC_NUMERIC=C [5] LC_TIME=Chinese (Simplified)_China.utf8

time zone: Asia/Shanghai tzcode source: internal

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

loaded via a namespace (and not attached): [1] compiler_4.3.2 cli_3.6.2 tools_4.3.2 crayon_1.5.2 [5] debugme_1.1.0 jsonlite_1.8.8 rlang_1.1.2 pak_0.7.1 [9] pkgdepends_0.7.1

gaborcsardi commented 9 months ago

How did you install pak? Can you try to install it like this? https://pak.r-lib.org/reference/install.html#pre-built-binaries

wtbxsjy commented 9 months ago

I reinstalled the prebuild binaries, and pak works well now. Thanks for your help.