stan-dev / rstan

RStan, the R interface to Stan
https://mc-stan.org
1.02k stars 264 forks source link

Error in compileCode when creating the stan_model #1061

Closed anna-shaonanw closed 1 year ago

anna-shaonanw commented 1 year ago

Summary:

I kept receiving error in compileCode with error 127 ( g++: command not foundmake) when creating the stan_model (model = stan_model("Example1.stan") )

Description:

The whole error message is Error in compileCode(f, code, language = language, verbose = verbose) : /bin/sh: line 1: g++: command not foundmake: *** [C:/PROGRA~1/R/R-43~1.0/etc/x64/Makeconf:272: file2e9021081cdc.o] Error 127 Error in sink(type = "output") : invalid connection

Reproducible Steps:

I followed the steps of https://github.com/stan-dev/rstan/wiki/Installing-RStan-from-Source to install the RStan. I also tried to directly install RStan from the CRAN packages in R.

Current Output:

If applicable, any relevant output from RStan.

Expected Output:

If applicable, the output you expected from RStan.

RStan Version:

‘2.21.8’

R Version:

R version 4.3.0 (2023-04-21 ucrt)

Operating System:

Windows 11