Unable to install package for R markdown

You don't have compilers and/or build tools on your machine. What is your OS? E.g. on Ubuntu you need to run

apt-get install build-essential