R shiny crash on loading examples (__cxa_guard_acquire detected deadlock) change default C++ standard library

My similar issue was solved by updating the packages it relies on. I did this with:

install.packages(c("Rcpp", "httpuv", "shiny"))

or in general:

update.packages()

I was having a similar problem. Doing the install this way and then explicitly calling library(Rcpp) in addition to library (shiny) fixed this for me.