Error installing R packages in GitHub actions: `Unable to locate package bwidget`

I’m trying to render a book via bookdown using GitHub Actions. The package dependencies install correctly when I use the following line:

Rscript -e "remotes::install_deps(dependencies = TRUE)"

However I receive an error when trying:

r-lib/actions/setup-r-dependencies@v2

Here’s the error I receive:

  ℹ Installing system requirements
  ℹ Executing `sh -c apt-get install -y bwidget`
  Reading package lists...
  Building dependency tree...
  Reading state information...
  E: Unable to locate package bwidget
  
  Error: <callr_remote_error: System command 'sh' failed, exit status: 100, stdout + stderr:
  E> Reading package lists...
  E> Building dependency tree...
  E> Reading state information...
  E> E: Unable to locate package bwidget>
   in process 668 
  -->
  System command 'sh' failed, exit status: 100, stdout + stderr:
  E> Reading package lists...
  E> Building dependency tree...
  E> Reading state information...
  E> E: Unable to locate package bwidget
  
   Stack trace:
  
   12. (function (...)  ...
   13. base:::withCallingHandlers(cli_message = function(msg) { ...
   14. get("lockfile_install_internal", asNamespace("pak"))(...)
   15. plan$install_sysreqs()
   16. pkgdepends:::sysreqs_install(srq$result %||% srq, config)
   17. base:::lapply(cmds, function(cmd) { ...
   18. pkgdepends:::FUN(X[[i]], ...)
   19. processx::run(sh, cmdline, stdout_callback = callback, stderr_to_stdout = TRUE)
   20. base:::throw(new_process_error(res, call = sys.call(), echo = echo,  ...
   21. base:::signalCondition(cond)
   22. (function (e)  ...
   23. base:::stop(e)
   24. (function (e)  ...
  
   x System command 'sh' failed, exit status: 100, stdout + stderr:
  E> Reading package lists...
  E> Building dependency tree...
  E> Reading state information...
  E> E: Unable to locate package bwidget 
  
  Execution halted
  Error: Process completed with exit code 1.

Here’s my workflow file: Principles-Psychological-Assessment/.github/workflows/deploy_bookdown.yml at main · isaactpetersen/Principles-Psychological-Assessment · GitHub

Here’s the log:
https://github.com/isaactpetersen/Principles-Psychological-Assessment/runs/6167506970?check_suite_focus=true

Heres’ the repo:

I am not sure why the bwidget installation fails, it's definitely an existing package on Ubuntu 20.04. Maybe the package database is outdated and pak does not update it. Try running

sudo apt-get update

before the setup-r-dependencies step.

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.