Problem with cmdstanr

I have a problem with cmdstan

This command check_cmdstan_toolchain(fix = TRUE, quiet = FALSE) gives the following output:

Installing mingw32-make and g++ with Rtools42.
Error in processx::run("pacman", args = c("-Sy", install_pkgs, "--noconfirm"), …:
! System command ‘pacman’ failed

Exit status: 1
error: failed to synchronize all databases (unable to lock database)

Thank you for yout help

The advice in a comment by CLRafaelR to GitHub Issue #653 has been helpful to many people who run into this problem.