Skip to content

pak install fails randomly on Windows 11 (R 4.5.1) #824

@lschneiderbauer

Description

@lschneiderbauer

pak::pkg_install() downloads all required packages, but the installation fails on random packages after ~ 2 to 10 being successfully installed.

Another call pak::pkg_install("tidyverse") installs the next ~ 2-10 packages and fails randomly again.

For example:

pak::pkg_install("tidyverse")
 Will install 19 packages.
→ Will download 19 packages with unknown size.
+ labeling      0.4.3  [dl]
+ lubridate     1.9.4  [dl]
+ modelr        0.1.11 [dl]
+ readr         2.1.5  [dl]
+ readxl        1.4.5  [dl]
+ rematch       2.0.0  [dl]
+ rematch2      2.1.2  [dl]
+ reprex        2.1.1  [dl]
+ rvest         1.0.5  [dl]
+ scales        1.4.0  [dl]
+ selectr       0.4-2  [dl]
+ tidyr         1.3.1  [dl]
+ tidyselect    1.2.1  [dl]
+ tidyverse     2.0.0  [dl]
+ timechange    0.3.0  [dl]
+ tzdb          0.5.0  [dl]
+ uuid          1.2-1  [dl]
+ viridisLite   0.4.2  [dl]
+ vroom         1.6.6  [dl]
ℹ Getting 19 pkgs with unknown sizes
✔ Cached copy of lubridate 1.9.4 (x86_64-w64-mingw32) is the latest build                                   
✔ Cached copy of modelr 0.1.11 (i386+x86_64-w64-mingw32) is the latest build                                                 
✔ Cached copy of readxl 1.4.5 (x86_64-w64-mingw32) is the latest build                                                       
✔ Cached copy of labeling 0.4.3 (i386+x86_64-w64-mingw32) is the latest build                                                
✔ Cached copy of readr 2.1.5 (x86_64-w64-mingw32) is the latest build                                                        
✔ Cached copy of rematch 2.0.0 (i386+x86_64-w64-mingw32) is the latest build                                                 
✔ Cached copy of reprex 2.1.1 (i386+x86_64-w64-mingw32) is the latest build                                                  
✔ Cached copy of vroom 1.6.6 (x86_64-w64-mingw32) is the latest build                                                        
✔ Cached copy of viridisLite 0.4.2 (i386+x86_64-w64-mingw32) is the latest build                                             
✔ Cached copy of timechange 0.3.0 (x86_64-w64-mingw32) is the latest build                                                   
✔ Cached copy of selectr 0.4-2 (i386+x86_64-w64-mingw32) is the latest build                                                 
✔ Cached copy of rvest 1.0.5 (i386+x86_64-w64-mingw32) is the latest build                                                  
✔ Cached copy of tzdb 0.5.0 (x86_64-w64-mingw32) is the latest build                                                      
✔ Cached copy of scales 1.4.0 (i386+x86_64-w64-mingw32) is the latest build                                               
✔ Cached copy of tidyverse 2.0.0 (i386+x86_64-w64-mingw32) is the latest build                                           
✔ Cached copy of rematch2 2.1.2 (i386+x86_64-w64-mingw32) is the latest build   
✔ Cached copy of uuid 1.2-1 (x86_64-w64-mingw32) is the latest build            
✔ Cached copy of tidyr 1.3.1 (x86_64-w64-mingw32) is the latest build           
✔ Cached copy of tidyselect 1.2.1 (i386+x86_64-w64-mingw32) is the latest build 
✔ No downloads needed, all packages are cached                                  
✔ Installed labeling 0.4.3  (890ms)                                                             
✔ Installed lubridate 1.9.4  (1.2s)                                                           
✔ Installed modelr 0.1.11  (1.3s)                                                           
✔ Installed rematch 2.0.0  (754ms)                                                            
✔ Installed readr 2.1.5  (2.1s)                                                              
✔ Installed rematch2 2.1.2  (1s)                                                             
✔ Installed readxl 1.4.5  (1.9s)                                                           
✔ Installed reprex 2.1.1  (1.2s)                                                            
✖ Failed to install rvest 1.0.5                                                            
Error: 
! error in pak subprocess
Caused by error in `stop_task_install(state, worker)`:
! Failed to install binary package rvest.
Type .Last.error to see the more details.
> .Last.error
<callr_error/rlib_error_3_0/rlib_error/error>
Error: 
! error in pak subprocess
Caused by error in `stop_task_install(state, worker)`:
! Failed to install binary package rvest.
---
Backtrace:
1. pak::pkg_install("tidyverse")
2. pak:::remote(function(...) get("pkg_install_do_plan", asNamespace("pak"))(...), …
3. err$throw(res$error)
---
Subprocess backtrace:
 1. base::withCallingHandlers(cli_message = function(msg) { …
 2. get("pkg_install_do_plan", asNamespace("pak"))(...)
 3. proposal$install()
 4. pkgdepends::install_package_plan(plan, lib = private$library, num_workers = nw, …
 5. base::withCallingHandlers({ …
 6. pkgdepends:::handle_events(state, events)
 7. pkgdepends:::handle_event(state, i)
 8. pkgdepends:::stop_task(state, worker)
 9. pkgdepends:::stop_task_install(state, worker)
10. base::throw(pkg_error("Failed to install binary package {.pkg {pkg}}.", …
11. | base::signalCondition(cond)
12. global (function (e) …

Repeated call:

pak::pkg_install("tidyverse")
→ Will install 10 packages.
→ Will download 10 packages with unknown size.
+ scales        1.4.0 [dl]
+ selectr       0.4-2 [dl]
+ tidyr         1.3.1 [dl]
+ tidyselect    1.2.1 [dl]
+ tidyverse     2.0.0 [dl]
+ timechange    0.3.0 [dl]
+ tzdb          0.5.0 [dl]
+ uuid          1.2-1 [dl]
+ viridisLite   0.4.2 [dl]
+ vroom         1.6.6 [dl]
ℹ Getting 10 pkgs with unknown sizes
✔ Got selectr 0.4-2 (i386+x86_64-w64-mingw32) (501.81 kB)                                                                   
✔ Got tidyr 1.3.1 (x86_64-w64-mingw32) (1.28 MB)                                       
✔ Got tidyselect 1.2.1 (i386+x86_64-w64-mingw32) (229.00 kB)                           
✔ Got tidyverse 2.0.0 (i386+x86_64-w64-mingw32) (431.51 kB)                            
✔ Got timechange 0.3.0 (x86_64-w64-mingw32) (533.31 kB)                                
✔ Got scales 1.4.0 (i386+x86_64-w64-mingw32) (879.01 kB)                               
✔ Got viridisLite 0.4.2 (i386+x86_64-w64-mingw32) (1.30 MB)                           
✔ Got vroom 1.6.6 (x86_64-w64-mingw32) (1.37 MB)                                
✔ Got tzdb 0.5.0 (x86_64-w64-mingw32) (1.05 MB)                                 
✔ Got uuid 1.2-1 (x86_64-w64-mingw32) (53.31 kB)                                
✔ Downloaded 10 packages (7.63 MB) in 14.4s                                     
✔ Installed selectr 0.4-2  (859ms)                                                              
✔ Installed scales 1.4.0  (1.2s)                                                                  
✔ Installed tidyselect 1.2.1  (1.2s)                                                                  
✔ Installed tidyverse 2.0.0  (994ms)                                                                
✖ Failed to install timechange 0.3.0                                                          
Error: 
! error in pak subprocess
Caused by error in `stop_task_install(state, worker)`:
! Failed to install binary package timechange.
Type .Last.error to see the more details.

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