"Non-zero exit status" error downloading XML and RCurl R packages "Non-zero exit status" error downloading XML and RCurl R packages xml xml

"Non-zero exit status" error downloading XML and RCurl R packages


Running over CentOS 6.4, I had just successfully follow the steps:

  1. Install curl-devel and libxml with the Linux command line:
$ sudo yum install curl curl-devel$ sudo yum -y install libxml2 libxml2-devel
  1. On R console, restart the R session and install the RCurl and XML package:
>> install.packages("RCurl")>> install.packages("XML")
  1. Load the libraries:
>> library(RCurl)>> library(XML)

Hope this save you a day!


You need to match the version of RCurl and XML to the version of R you are using. Since your version of R is more one major version behind the current version, there is no reason to think the current version of XML and Rcurl will match. You can try installing from an archived version ot them. I would pick one from about a year and a half ago..... or just update your R installation.

There might be a kernel of useful information in that link from @TylerRinker despite it being for the wrong version of the wrong OS. If you trim the URL and look instead at: http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.13/ you will be able to figure out which version of the source packages to use for your out-of-date version of R on redhat.


I had a similar problem when installing RCurl. The package that had what I needed was called libcurl-devel on Amazon Linux and, according this post that answered my question, CentOS as well. It can be installed with the command sudo yum install libcurl-devel. If you are on a Debian based distribution the package may have a different name and will be install using apt.

There is probably a similar solution to your XML lib problem.