Errors running brms model with rstan or cmdstanr backends

The solution for the socklist error using backend = "rstan" – suggested here Error in unserialize(socklist[[n]]) : error reading from connection - #13 by t-anton – is quite straightforward:

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

This installs a more recent version of rstan than what is available on cran (and hence “seen” by RStudio).