Sample Header Ad - 728x90

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

0 votes
1 answer
1454 views
I'm sorry for having written such a long question, but given how many times similar questions have been asked, I felt like I had to give a lot more context. ---- In my system, I get. . .
checking for curl-config... /usr/bin/curl-config
checking libcurl version ... 8.2.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... 
configure: error: libcurl >= 7.28.0 library and headers are required with support for https
when trying to install R (**version 4.0.3**, this is non-negotiable) with ./configure --prefix=/opt/R/ --exec-prefix=/opt/R/ --with-libpth-prefix=/opt/ --without-recommended-packages --with-pcre1 --enable-R-shlib. In config.log, I see the following.
configure:46024: checking for curl-config
configure:46042: found /usr/bin/curl-config
configure:46054: result: /usr/bin/curl-config
configure:46080: checking curl/curl.h usability
configure:46080: gcc -c  -g -O2 -fpic  -I/usr/local/include  conftest.c >&5
configure:46080: $? = 0
configure:46080: result: yes
configure:46080: checking curl/curl.h presence
configure:46080: gcc -E  -I/usr/local/include  conftest.c
configure:46080: $? = 0
configure:46080: result: yes
configure:46080: checking for curl/curl.h
configure:46080: result: yes
configure:46094: checking if libcurl is version 7 and >= 7.28.0
configure:46123: gcc -o conftest  -g -O2 -fpic  -I/usr/local/include  -L/usr/local/lib64 conftest.c -lcurl -lpcre -llzma -lbz2 -lz -lrt -ldl -lm  >&5
configure:46123: $? = 0
configure:46123: ./conftest
configure:46123: $? = 1
configure: program exited with status 1
configure: failed program was:
And then, after the contents of confdefs.h have been exposed, I see:
#include 
| #include 
| int main()
| {
| #ifdef LIBCURL_VERSION_MAJOR
| #if LIBCURL_VERSION_MAJOR > 7
|   exit(1);
| #elif LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 28
|   exit(0);
| #else
|   exit(1);
| #endif
| #else
|   exit(1);
| #endif
| }
| 
configure:46133: result: 
configure:46191: error: libcurl >= 7.28.0 library and headers are required with support for https
There are multiple questions concerning the same error across multiple websites, but none of the solutions I tried worked for me. Since apparently I have multiple versions of available. . .
bash-4.2# yum list curl --showduplicates | head -n 5
Loaded plugins: ovl, priorities
Installed Packages
curl.x86_64                    8.2.1-1.amzn2.0.3                      installed 
Available Packages
curl.x86_64                    7.55.1-8.amzn2.0.1                     amzn2-core
bash-4.2# yum list libcurl --showduplicates | head -n 5
Loaded plugins: ovl, priorities
Installed Packages
libcurl.x86_64                  8.2.1-1.amzn2.0.3                     installed 
Available Packages
libcurl.x86_64                  7.55.1-8.amzn2.0.1                    amzn2-core
. . . (I have many more of each), my last tries have revolved around trying to downgrade and/or remove curl and libcurl, but no luck:
bash-4.2# yum downgrade libcurl
Loaded plugins: ovl, priorities
amzn2-core                                                                                                                                                                                  | 3.6 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package libcurl.x86_64 0:8.2.1-1.amzn2.0.2 will be a downgrade
---> Package libcurl.x86_64 0:8.2.1-1.amzn2.0.3 will be erased
--> Finished Dependency Resolution
Error: Package: curl-8.2.1-1.amzn2.0.3.x86_64 (installed)
           Requires: libcurl(x86-64) = 8.2.1-1.amzn2.0.3
(The output continues). I'm working in a docker container, so the above is easily reproducible. I leave the Docker file at the end of this question. I presume the following is useful system information.
bash-4.2# cat /etc/*-release*
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/ "
SUPPORT_END="2025-06-30"
Amazon Linux release 2 (Karoo)
cpe:2.3:o:amazon:amazon_linux:2
Can anyone help me fix this? ---- Here's Dockerfile:
FROM amazonlinux:2

RUN yum update -y && \
    yum install -y make zip gzip tar which wget java \
    readline-devel \
    xorg-x11-server-devel libX11-devel libXt-devel \
    libcurl-devel libcurl4-openssl-dev \
    openssl-devel libxml2-devel \
    gcc-c++ gcc-gfortran \
    zlib-devel bzip2 bzip2-libs bzip2-devel xz-devel && \
    yum clean all

RUN mkdir -p /opt/R /opt/bin

RUN mv /usr/bin/which /opt/bin/

WORKDIR /opt
RUN wget https://cran.r-project.org/src/base/R-4/R-4.0.3.tar.gz  && \
    tar -xf R-4.0.3.tar.gz && \
    mv R-4.0.3/* /opt/R && \
    rm -rf R-4.0.3.tar.gz R-4.0.3

WORKDIR /opt/R

# RUN ./configure --prefix=/opt/R/ --exec-prefix=/opt/R/ --with-libpth-prefix=/opt/ \
#     --without-recommended-packages --with-pcre1 --enable-R-shlib

CMD ["bash"]
Asked by Sweet Shell O'Mine (315 rep)
Oct 3, 2023, 09:35 AM
Last activity: Oct 3, 2023, 11:17 AM