I had the same problem and what I did was update all the packages with the function
update.packages()
Next I reinstalled the library "shiny" ;
install.packages("shiny", repos = c("http://rstudio.org/_packages", "http://cran.rstudio.com"))
I answered "yes" to the question
"Do you want to install from sources the package which needs compilation?"
And the error disappeared.