When trying to install the R package RCurl I get the following error:

checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’

Yet, curl-config exists in the system:

$ curl-config --version
libcurl 7.43.0

Though it lays in the anaconda folder

$ which curl-config:

So I try to install it properly so that R finds it. Since I read curl-config comes with libcurl3-openssl-dev, I tried to install it, but it complains about dependencies:

$ apt-get install libcurl3-openssl-dev:
The following packages have unmet dependencies:
 libcurl4-openssl-dev : Depends: libcurl3 (= 7.22.0-3ubuntu4) but 7.22.0-3ubuntu4.10 is to be installed
                        Depends: libkrb5-dev but it is not going to be installed
                        Depends: librtmp-dev but it is not going to be installe

(according to sudo apt-get -f install everything is fine)

How shoud I proceed?


$ apt-cache policy libcurl4-openssl-dev
  Installed: (none)
  Candidate: 7.22.0-3ubuntu4
  Version table:
     7.22.0-3ubuntu4 0
        500 http://fr.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages


http://packages.ubuntu.com/precise/libcurl4-openssl-dev is a security package. I enabled the security repositories in sources.list and libcurl4-openssl-dev was successfully installed.

  • Edit your question and add the output of apt-cache policy libcurl4-openssl-dev libcurl3 and give me a ping with @A.B.
    – A.B.
    Sep 20, 2015 at 11:01
  • The package libcurl3-openssl-dev isn't available for Precise. Is that a typo?
    – A.B.
    Sep 20, 2015 at 11:01
  • @A.B. edit done. No, it is not a typo. In theory, I should install libcurl4 (omegahat.org/RCurl/FAQ.html) but the dependency error (the same as shown for libcurl3) made me think I should try with libcurl3 instead.
    – alberto
    Sep 20, 2015 at 14:14
  • Actually what made me think I needed libcurl3 is that I read curl-config comes with libcurl3-openssl-dev and not with libcurl4-openssl-dev manpages.ubuntu.com/manpages/dapper/man1/curl-config.1.html
    – alberto
    Sep 20, 2015 at 14:30

2 Answers 2


The current version for libcurl4-openssl-dev is 7.22.0-3ubuntu4.14 and not 7.22.0-3ubuntu4. Therefore the installation of libcurl3 is blocked.

Use the main server

sudo sed 's/http:\/\/fr\./http:\/\//' /etc/apt/sources.list

And you should check, if you have enabled precise-security and precise-updates in Software & Updates in the tab Updates.

Now upgrade your system

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install --reinstall libcurl4-openssl-dev

Note, that /usr/bin/curl-config is available in the packages

  • libcurl4-gnutls-dev
  • libcurl4-nss-dev
  • libcurl4-openssl-dev

I had the same issue and I could install libcurl4-gnutls-dev this way:

sudo vim /etc/apt/sources.list and add these two lines at the end of the file

deb http://security.ubuntu.com/ubuntu/ precise-security restricted main multiverse universe
deb http://us.archive.ubuntu.com/ubuntu/ precise-updates restricted main multiverse universe


sudo apt-get update
sudo apt-get install libcurl4-gnutls-dev

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.