Problem loading rstan from temporary location during installation

I’m unable to install rstan on macOS using g++ 11 provided from homebrew. My .R/Makevars looks like this

VER=-11
CC=gcc$(VER)
CXX=g++$(VER)
CXX14=g++$(VER)

Using a blank Makevars uses the default clang++ which gives errors that suggest clang++ is too old. Any suggestions?

** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘rstan’:
 .onLoad failed in loadNamespace() for 'rstan', details:
  call: dyn.load(tbbmalloc_proxy, local = FALSE, now = TRUE)
  error: unable to load shared object '/private/var/folders/sp/vl960z2n1ys9v6k4ql3
whpv40000gn/T/RtmpTaBDix/R.INSTALLf5824fcfde91/rstan/':
  dlopen(/private/var/folders/sp/vl960z2n1ys9v6k4ql3whpv40000gn/T/RtmpTaBDix/R.INS
TALLf5824fcfde91/rstan/, 10): no suitable image found.  Did find:
        /private/var/folders/sp/vl960z2n1ys9v6k4ql3whpv40000gn/T/RtmpTaBDix/R.INST
ALLf5824fcfde91/rstan/: not a file
        /private/var/folders/sp/vl960z2n1ys9v6k4ql3whpv40000gn/T/RtmpTaBDix/R.INST
ALLf5824fcfde91/rstan: not a file
Error: loading failed
Execution halted
ERROR: loading failed

Can you try installing the preview of rstan 2.27? Installed via:

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