Trouble installing CmdstanR

Hi all,

Apologies in advance if this post is a bit vague.

We’re trying to install CmdstanR on a machine with more RAM/computing power than I currently have, but I don’t own the machine and have been assisting with remote access.

First, after installing the R package cmdstanr, we run check_cmdstan_toolchain which yields:

Rtools43 installation found but the toolchain was not installed.
Run cmdstanr::check_cmdstan_toolchain(fix = TRUE) to fix the issue.

Then, we run that (with fix = TRUE) and it yields:

Installing mingw32-make and g++ with Rtools43
Installation of the toolchain failed. Try reinstalling RTools and trying again.
If the issue persists, open a bug report at

So we go in the Windows installation settings, uninstall Rtools43, and install it again. The issue unfortunately persists.

Following a thread on this forum, we tried to add the argument overwrite = TRUE to install_cmdstan() which also doesn’t work.

Are these issues common and if so, are there some solutions we can try? Please let me know if I should try some things and report back!



1 Like

Sorry this hasn’t gotten a response.

Can you check if CmdStan actually gets downloaded? You will need a machine that lets you download, which is sometimes locked down. As an alternative, you can try downloading CmdStan and then just pointing cmdstanr at the downloaded CmdStan. Then you can try rebuild_cmdstan() with the path.

1 Like

I would definitely check what @Bob_Carpenter suggested, but if that doesn’t work then I’m guessing solving this will require some bit of knowledge about Windows that I lack. @rok_cesnovar Any ideas here? (Could it maybe even be a permissions issue?)

Hi, no worries about the late response. We ended up going with a different machine where it wasn’t a problem. I suspect Bob was onto something with stuff being locked… will park this for now now we have the different machine. Thanks a lot!

Thanks for following up. Glad you got it working on a different machine.

Can you try installing the latest release (released a few days ago)? I think the issue was resolved with version 0.6.0. Let me know if it doesn’t resolve the problem and we can dig deeper.

1 Like