"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
crystal-lang/install-crystalbefore v1.9.3 installslibpcre3-devfor every Crystal version, so the action stops before Crystal is installed (install-crystal #83). v1.9.3 (October 4) installslibpcre2-devfor Crystal 1.8 and later, and@v1includes that change. Crystal older than 1.8 uses PCRE1, so it still asks forlibpcre3-dev.- nginx built from source: nginx 1.21.5 and later builds with PCRE2 (
checking for PCRE2 library ... found), so those jobs can droplibpcre3-dev. OpenResty 1.21.4.x is based on nginx 1.21.4 and needs PCRE1 (apisix-nginx-module #134). - Nim:
std/reloadslibpcre.so.3when the program starts, and it does not work with PCRE2 (Nim #26070, open). The program compiles, and the test step fails. - Haskell:
pcre-lightbinds the system PCRE1. A pull request for LaunchDarkly's server SDK replaces it withregex-pcre-builtin, which builds the PCRE C sources with the package and needs no system library (haskell-server-sdk #122). - Binaries linked to
libpcre.so.3: pioarduino's Linux build of cppcheck is one (witchhunt-reader #578). The New Relic PHP agent supports only PCRE1, so it does not build from source on 26.04 (newrelic-php-agent #1367). - Many workflows install
libpcre3-devout of habit and use nothing from it. A pull request for Apache Traffic Server removes it from the CodeQL workflow (trafficserver #13982).
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
- Crystal:
crystal-lang/install-crystal@v1(or v1.9.3 and later) with Crystal 1.8 or later. - nginx: 1.21.5 or later. An OpenResty 1.21.4.x build needs a newer OpenResty, or Fix 3.
- Nim: until
std/resupports PCRE2, a regex library written in Nim, such as the regex package, needs no system library. - Haskell: regex-pcre-builtin needs no system library, and regex-pcre2 uses
libpcre2-dev. - A binary from elsewhere: a release built against PCRE2, or a statically linked one.
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
lddon the binary showslibpcre.so.3 => not foundon 26.04 when PCRE1 is what is missing.- Look at "Set up job": the Runner Image group shows the image. Until November 19 a re-run can land on 24.04 and pass, so a green re-run proves nothing.
- "Unable to locate package" for other names is the wider list of packages renamed or removed on 26.04: apt on Ubuntu 26.04.
Other 26.04 failures
- rpmbuild on Ubuntu 26.04: rpm is 6.0.1, so
%installruns in a per-package build directory and Electron Forge's RPM maker fails with "cp: cannot stat 'usr/*'", and packages are v6 unless you pass_rpmformat 4. - "cannot enable executable stack" on Ubuntu 26.04: glibc 2.43 refuses to
dlopena library that asks for an executable stack, so Julia 1.10.0 to 1.10.8, conda-forge TensorFlow 2.19 and some MEX files fail with "Invalid argument"; clear the flag withpatchelf --clear-execstack. - apt on Ubuntu 26.04: renamed and removed packages, such as
qemu-user-static,gcc-10andclang-format-14. - "cannot open shared object file" on Ubuntu 26.04: libxml2 is
libxml2.so.16and ICU is 78, so a cache saved on 24.04, or a binary built for it, cannot findlibxml2.so.2orlibicudata.so.74. - C and C++ builds that fail with GCC 15 on Ubuntu 26.04: the default gcc goes from 13 to 15, so C is compiled as C23, six old warnings are errors, and C++ headers no longer pull in
<cstdint>for you. - "disk quota exceeded" in /tmp on Ubuntu 26.04: the first 26.04 images had
/tmpas a tmpfs of about 7.9G with a per-user quota, so large builds in/tmpfailed; setTMPDIRto$RUNNER_TEMP. - "coreutils: unknown program": most core tools are uutils.
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 · 日本語