Site icon GetPageSpeed

Installing the latest curl with HTTP/3 on CentOS, RHEL, and Fedora

Latest curl RPM

Latest curl RPM

The system-provided curl and libcurl packages in Enterprise Linux distributions (CentOS, RHEL, AlmaLinux, Rocky Linux) are stable but often outdated. They may lack support for modern protocols like HTTP/3 (QUIC) or compression algorithms like Zstd.

Upgrading the system curl is dangerous because many system tools (like dnf/yum) depend on it. If you break the system libcurl, you break the package manager.

The solution is curl-latest.

What is curl-latest?

curl-latest is a repackaged version of the upstream curl source code, designed to be installed side-by-side with your system’s curl.
It provides /usr/bin/curl-latest binary with all the latest protocols supported.

It does not replace or conflict with /usr/bin/curl or /usr/lib64/libcurl.so. You can have both installed and use the latest version for your applications while the system keeps using its older, stable version.

Key Features

Supported Distributions

This package is available for all major RPM-based distributions:

Both ARM and x86_64 architectures are supported!

Installation

  1. Enable the GetPageSpeed Extras repository:
    sudo dnf install https://extras.getpagespeed.com/release-latest.rpm
    
  2. Install curl-latest:
    sudo dnf install curl-latest
    

Usage

Command Line

Simply use curl-latest instead of curl:

curl-latest -V

Test HTTP/3 support:

curl-latest --http3 -v https://cloudflare-quic.com/

Development (Linking against libcurl-latest)

The libcurl-latest package is the corresponding curl library used by curl-latest binary. You can build your applications by linking to this library to leverage latest protocols in your own applications.

The libcurl-latest-devel provides headers necessary to compile your applications against the latest curl:

Important: libcurl-latest always tracks any further release of stable curl, so the ABI can break between updates. Thus, if you choose to build your application against it, you must always rebuild for every new libcurl-latest.

If you are building software and want to link against this modern library instead of the system one, install the development package:

sudo dnf install libcurl-latest-devel

Using pkg-config

The package provides a distinct pkg-config file to avoid confusion:

pkg-config --cflags --libs libcurl-latest

Using curl-config

A renamed config script is also available:

curl-latest-config --cflags --libs

Compiling Example

To compile a C program myprog.c against libcurl-latest:

gcc myprog.c -o myprog $(pkg-config --cflags --libs libcurl-latest)

Why use this over compilation of entire curl library?

Exit mobile version