http://stackoverflow.com/questions/20671814/non-zero-exit-status-r-3-0-1-xml-and-rcurl
in short, you need to install curl, xml2 library on your OS
To install curl and xml on ubuntu. Run
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libxml2-dev
in CentOS 6+ you can do it using
sudo yum -y install curl
sudo yum -y install libcurl libcurl-devel
sudo yum -y install libxml2 libxml2-devel