If you’re encountering the ERROR: configuration failed for package ‘RCurl’ message and are running CentOS 6.4, or RHEL6, or probably Fedora, too, read on. I was working through this very nice post by Matt Sundquist concerning the Plot.ly API for R and ran into trouble…in the first line of code, install.packages("devtools"), installing the R package devtools.

Before going on, I want to give a shout out to Zach Mayer and his comment on this SO post that lead to the solution.

The first time I encountered the non-zero exit status was a acouple of months back when also trying to install devtools. I put off solving the problem until I found some motivation. My wanting to explore and use this cool, new API is that motivation! It’s not necessary to work back through the problem like I do here, manually installing the dependencies for devtools until encountering the error. But, the approach allows me to isolate the problem. I”m lazy, too. I don’t like spitting out tons of log messages to the console and scrolling up and down looking for one line. So, here it is, the attempt to install the RCurl package. The error message is easy to spot:

>> install.packages("RCurl")
Installing package into ‘/home/user/R/x86_64-redhat-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
trying URL 'http://cran.fhcrc.org/src/contrib/RCurl_1.95-4.1.tar.gz'
Content type 'application/x-gzip' length 870915 bytes (850 Kb)
opened URL
downloaded 850 Kb

* installing *source* package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/home/user/R/x86_64-redhat-linux-gnu-library/3.0/RCurl’
Warning in install.packages :
  installation of package ‘RCurl’ had non-zero exit status

The downloaded source packages are in

To solve the problem, enter this command at the Linux command line:

$ sudo yum install curl curl-devel

Back at the R console, install the devtools package:

>> install.packages("devtools")

And load it:

>> require(devtools)
Loading required package: devtools

7 thoughts on “Cannot Find curl-config When Installing R devtools Package

Leave a reply


<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>