stan-dev / rstan

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

Error messages when running example(stan_model, package = "rstan", run.dontrun = TRUE) #1103

Open ndcn0002 opened 1 year ago

ndcn0002 commented 1 year ago

Hi All,

I'm new to rstan. I just installed rstan by:

  install.packages("rstan", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))

Once it was installed, I loaded libraries StanHeaders and rstan

  library(StanHeaders)
  library(rstan)

Then I ran:

  example(stan_model, package = "rstan", run.dontrun = TRUE)

which gave me a lot of messages (400 lines) which ended with the following:

  Compilation ERROR, function(s)/method(s) not created!
  Error in compileCode(f, code, language = language, verbose = verbose) : 
  Error in system(paste(MAKE, p1(paste("-f", shQuote(makefiles))), "compilers"),  :   'make' not foundCalls: <Anonymous> -> 
  .shlib_internal -> systemExecution halted

So I assumed I did something wrong or missed some installation steps. Any advice would be very much appreciated

Thanks!

ChenghuFeng commented 1 year ago

Maybe you should install rstan following this website https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started

rosgori commented 11 months ago

If you still have problems, try these instructions: https://discourse.mc-stan.org/t/rstan-2-30/30415/2?u=rosgori