"Non Zero Exit Status" R 3.0.1 'XML' and 'RCurl'

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

To install curl and xml on Ubuntu. Run

sudo apt-get install libcurl4-openssl-dev libxml2-dev

The error messages on package install in R indicate that the curl and xml libraries are not present or cannot be found.


For those who can't install using yum or apt-get, I share my experience:

I installed libcurl-openssl-dev myself by downloading the source code and compiling. I still ran into the Cannot find curl-config problem though...I didn't know what to do until looking at RCurl source code and seeing a CURL_CONFIG environment variable being referenced. I tried setting this myself in my .bashrc and it seems to have worked:

export CURL_CONFIG=~/my/libcurl/curl-config