You said you can run cmdstan from the terminal but not cmdstanr from RStudio.
Yes, that’s right.
How about cmdstanr from the terminal? Can you try opening R in the terminal instead of RStudio and running the cmdstanr model you tried via cmdstanr (not just cmdstan)?
I have the same error. (see image: Left is via R and cmdstan R, right is via terminal and cmdstan)
