Lesstep
GitHub Actions · Ubuntu 26.04 · Checked November 4, 2026

"Package 'libpcre3-dev' has no installation candidate" on Ubuntu 26.04

ubuntu-latest is moving from Ubuntu 24.04 to 26.04 between October 19 and November 19, 2026 (what else changes). Ubuntu 26.04 no longer has PCRE1, the older of the two PCRE regular expression libraries (the pcre3 packages, version 8.39). On November 4, Ubuntu's package list showed libpcre3 and libpcre3-dev for 24.04 and "Package not available in this suite" for 26.04. Only PCRE2 is left, as libpcre2-dev 10.46. PCRE1's last release, 8.45, came out in 2021 and is no longer maintained, so this will not be fixed by waiting.

What it looks like

In the apt step:

E: Unable to locate package libpcre3
E: Package 'libpcre3-dev' has no installation candidate

The second comes after "Package libpcre3-dev is not available, but is referred to by another package." When nothing installs it, a program or a build that still needs PCRE1 fails later, in its own words:

error while loading shared libraries: libpcre.so.3: cannot open shared object file: No such file or directory
could not load: libpcre.so(.3|.1|)
fatal error: pcre.h: No such file or directory
* Missing (or bad) C library: pcre

In order: a binary built for 24.04 or earlier and linked to PCRE1, a Nim program that uses std/re, C code that includes the PCRE1 header, and the Haskell package pcre-light in a cabal or stack build.

What still needs PCRE1

Fix 1: install PCRE2, or nothing

If the software builds with PCRE2, change the package:

- run: sudo apt-get update && sudo apt-get install -y libpcre2-dev

24.04 has libpcre2-dev too, so the same line works on both images. If nothing in the job uses PCRE, drop it from the list. Removing it in a branch and running the job on runs-on: ubuntu-26.04 shows whether anything needed it.

Fix 2: move the tool off PCRE1

Fix 3: keep that job on 24.04

jobs:
  cppcheck:
    runs-on: ubuntu-24.04
    steps:
      - run: sudo apt-get update && sudo apt-get install -y libpcre3

It holds until GitHub retires the 24.04 image. Building PCRE 8.45 from source on 26.04 works too, but it brings back a library that has reached end of life.

Telling it apart

Other 26.04 failures

See failed jobs from IntelliJ IDEA

Pipeline Inbox for GitHub Actions Workflows, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the runs of all your repositories in an IDE tool window, with their jobs and steps, and your current branch's runs are in the status bar. Reading is free; re-running failed jobs, cancelling, running workflows and reviewing deployments are Pro (US$1.50 a month, with a 30-day trial).

Get it on JetBrains Marketplace

GitHub and GitHub Actions are trademarks of GitHub, Inc.; Ubuntu is a trademark of Canonical Ltd.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with, sponsored or endorsed by GitHub, Inc., Canonical or JetBrains.

More: "The ubuntu-latest label will migrate to Ubuntu 26" · apt on Ubuntu 26.04 · GitHub Actions plugins for IntelliJ IDEA compared · 日本語