Hello! I have recently run into a problem with trying to install the cmdstanr package in R, specifically setting up the cmdstan toolchain.
Essentially, I use the cmdstanr backend to fit MCMC using the brms package, and I do this across multiple machines. With recently updating to R 4.4.1, I had an issue using cmdstanr across my machines and followed this advice to get it working again.
However, on one of my machines I run into the following problem when trying to run the function check_cmdstan_toolchain(fix = TRUE)
.
> cmdstanr::check_cmdstan_toolchain()
Error:
Rtools44 installation found but the toolchain was not installed.
Run cmdstanr::check_cmdstan_toolchain(fix = TRUE) to fix the issue.
> # if error, try:
> cmdstanr::check_cmdstan_toolchain(fix = TRUE)
Installing mingw32-make and g++ with Rtools44
Error in `processx::run("pacman", args = c("-Sy", install_pkgs, "--noconfirm"), …`:
! System command 'pacman' failed
---
Exit status: 1
Stderr (last 10 lines, see `$stderr` for more):
error: clang64: signature from "Christoph Reiter (MSYS2 development key) <reiter.christoph@gmail.com>" is unknown trust
error: msys: signature from "Christoph Reiter (MSYS2 development key) <reiter.christoph@gmail.com>" is unknown trust
...
This continues on for several more lines, all with the same “unknown trust” error. I have tried searching around for some solutions, including following examples from here to update MSYS2 and refresh keys. What I have been able to run in MSYS2 directly suggests that these packages are all up to date and that the keys do not need to be updated because they have not changed.
I will note that this issue does not occur on my two personal machines - it’s my office computer where this is a problem, but has not been an issue in the past. I am able to fit MCMC using brms but with rstan as the backend.
I apologize if this is a mundane question, but I am a mere mortal who greatly appreciates these software tools and their utility for my work - thanks so much for your consideration.