Error 127

Hey, I am quite new to rstan and would like to dig deeper. However, I am facing issues when running the example code: example(stan_model, package = “rstan”, run.dontrun = TRUE).

I have somehow fixed the issue yesterday. Today I wanted to run the script again and I got the following error message: Error in compileCode(f, code, language = language, verbose = verbose) :
sh: line 1: C:/Rtools/mingw_64/bin/g++: No such file or directorymake: *** [C:/PROGRA~1/R/R-41~1.1/etc/x64/Makeconf:245: file4c6c77436bf8.o] Error 127

I have read through the forum, however, it is not workig for me. Moreover, there is also an g++.exe file in that folder. It would be great if someone could help me out.

Thanks in advance

It looks your system is configured to use Rtools3.5, but you have R4.x.

Can you try the steps in the R4.0 getting started section: Configuring C Toolchain for Windows · stan-dev/rstan Wiki · GitHub

Thanks a lot for your quick response. It is working. However, the issue is, I have to repeat this setup every day somehow. It worked out yesterday and then I had to do redo it again today. This was the same the day before. Did I mess something up while installing it?
Thanks again for your great help, appreciate it.

Hm, it’s a bit odd that you have to repeat the process. Which part do you have to repeat? Is it the .Rprofile section?

Yeah, I had to repeat it twice. But now it is working. Seems like I haved messed something up before. I appreciate your great help and looking forward to dig deeper into Stan. :-)