Have you modified the run_as option in your shiny-server config file? Can you show the complete output of running sudo su - -c "R -e "install.packages('rmarkdown', repos='http://cran.rstudio.com/')"" in a system terminal?
BTW, please do not post screenshots of your terminal, they are considered a bad practice here, post the output as formatted code instead. Here is how to do it