Centos – configure: error: libcurl >= 7.28.0 library and headers are required with support for https

centoscurlheader-filelibraries

Hi I met an issue when I tried to configure for R installation.
Basically, I tried to follow my previous installation process,
(For some reason, I need to reinstall the same R in CentOS6 instead of CentOS5)

./configure –prefix=$HOME/Programme/R-3.3.2 –enable-R-shlib LDFLAGS="-L/$HOME/Programme/zlib-1.2.11/lib -L/$HOME/Programme/bzip2-1.0.6/lib -L/$HOME/Programme/xz-5.2.3/lib -L/$HOME/Programme/pcre-8.40/lib -L/$HOME/Programme/curl-7.47.1/lib" CPPFLAGS="-I/$HOME/Programme/zlib-1.2.11/include -I/$HOME/Programme/bzip2-1.0.6/include -I/$HOME/Programme/xz-5.2.3/include -I/$HOME/Programme/pcre-8.40/include -I/$HOME/Programme/curl-7.47.1/include"

configure exited because:

...
checking for curl-config... /u32/myusername/Programme/curl-7.52.1/bin//curl-config
checking libcurl version ... 7.52.1
checking curl/curl.h usability... yes
checking curl/curl.h presence... yes
checking for curl/curl.h... yes
checking if libcurl is version 7 and >= 7.28.0... yes
checking if libcurl supports https... no
configure: error: libcurl >= 7.28.0 library and headers are required with support for https

noticed someone used and "7.47.1" it seemed to work for him/her,
so installed "7.47.1", but it did not work.
http://pj.freefaculty.org/blog/?p=315

checking for curl-config... /u32/myusername/Programme/curl-7.47.1/bin//curl-config
checking libcurl version ... 7.47.1
checking curl/curl.h usability... yes
checking curl/curl.h presence... yes
checking for curl/curl.h... yes
checking if libcurl is version 7 and >= 7.28.0... yes
checking if libcurl supports https... no
configure: error: libcurl >= 7.28.0 library and headers are required with support for https

noticed someone suggested to install a "libcurl-devel" ./config returns libcurl error
so I downloaded: ftp://fr2.rpmfind.net/linux/centos/6.8/os/x86_64/Packages/libcurl-devel-7.19.7-52.el6.x86_64.rpm
installed and set the PATH for it.

checking for curl-config... /u32/myusername/Programme/libcurl-devel/usr/bin/curl-config
checking libcurl version ... 7.19.7
checking curl/curl.h usability... yes
checking curl/curl.h presence... yes
checking for curl/curl.h... yes
checking if libcurl is version 7 and >= 7.28.0... yes
checking if libcurl supports https... no
configure: error: libcurl >= 7.28.0 library and headers are required with support for https

noticed that "checking libcurl version … 7.19.7" I speculated that the "libcurl-devel" might be too old.
so I installed "libcurl-devel-7.29.0-35.el7.centos.x86_64.rpm" (this is for CentOS7, I could not find CentOS6 version)

checking for curl-config... /u32/myusername/Programme/libcurl_devel/usr/bin//curl-config
checking libcurl version ... 7.29.0
checking curl/curl.h usability... yes
checking curl/curl.h presence... yes
checking for curl/curl.h... yes
checking if libcurl is version 7 and >= 7.28.0... yes
checking if libcurl supports https... no
configure: error: libcurl >= 7.28.0 library and headers are required with support for https

Any suggestion?

Best Answer

The other answer that got downvoted for some reason is completely right: .configure will produce a log file config.log, which will show the details of the checking if libcurl supports https test (most likely via an attempt to compile a given program).

Look at this log file, find out if your version of libcurl really doesn't support http, or if there is some other problem (e.g. missing/wrong library or include paths, or wrong library order, or trouble with your gcc variant, or changes in the library). In the latter case, fix the problem, possibly in configure.in or the equivalent, possibly by adding more options to the ones you already have, or changing the order of the libraries, or using a different gcc version.

In the former case, since you compiled libcurl yourself, make sure it's configured correctly and does support https.

I've done similar things on multiple occasions when self-compiling stuff.

You won't find "official sources" on this, that's just basic developing technique. You can easily convince yourself that the log file contains more detailed information by looking at it. It's a bit verbose, search for the checking if libcurl string to see the important part.

Randomly installing different versions of libraries without knowing what's wrong is not going to help.

Related Question