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

apt on ubuntu-latest (Ubuntu 26.04): "has no installation candidate" and "Unable to locate package"

ubuntu-latest is moving from Ubuntu 24.04 to 26.04 between October 19 and November 19, 2026 (what else changes). Some packages that 24.04 had are renamed or gone in 26.04, so an apt-get install step that worked last week stops within seconds with exit code 100. The error names the package, and the lines just above it often name the replacement.

The two messages

"Unable to locate package" means 26.04 has nothing by that name. "has no installation candidate" means apt knows the name, because another package refers to it or provides it, but there is nothing to install under it. The same step can print both (utf8.h #152):

E: Unable to locate package gcc-10
E: Package 'g++-10' has no installation candidate
##[error]Process completed with exit code 100.

For a renamed package, apt says what replaced it (promptvault-lite #352):

Package webkit2gtk-driver is not available, but is referred to by another package.
However the following packages replace it:
  webkitgtk-webdriver
E: Package 'webkit2gtk-driver' has no installation candidate

For a name that became virtual, it lists the providers and will not pick one (afactory #554):

Package qemu-user-static is a virtual package provided by:
  qemu-user-binfmt-hwe 1:10.2.1+ds-1ubuntu4.4
  qemu-user-binfmt 1:10.2.1+ds-1ubuntu3.3
E: Package 'qemu-user-static' has no installation candidate

apt stops at the first name it cannot install, so after you fix one, the next run can stop at another one from the same list.

The names that changed

Checked against the Ubuntu archive for noble (24.04) and resolute (26.04):

The compilers that come installed changed too, so a job that calls one without installing it can fail with "command not found": the 24.04 image has GCC 12, 13 and 14 and Clang 16, 17 and 18; the 26.04 image has GCC 13, 14 and 15 and Clang 20, 21 and 22 (the Ubuntu 26.04 image readme).

An install step that works on both images

Until November 19 the same job can land on either image. Where the new name exists on 24.04 too (qemu-system-x86, lz4, libgdk-pixbuf-2.0-0, the -dev packages, gcc-14, clang-18), switch to it. Otherwise, branch on the release:

- name: Install QEMU
  run: |
    . /etc/os-release
    if [ "$VERSION_ID" = "26.04" ]; then
      sudo apt-get install -y qemu-user qemu-user-binfmt
    else
      sudo apt-get install -y qemu-user-static
    fi

Scripts that call qemu-aarch64-static by name need the name without -static on 26.04. If QEMU is only there for Docker multi-platform builds, docker/setup-qemu-action registers the emulators from a container image and does not use apt at all.

A formatting check is different: each clang-format version formats a little differently, so moving from 14 to 18 can fail the check on code nobody touched. Keep the version from PyPI instead of apt (pipx is on both images):

- run: pipx install clang-format==14.0.6

Then call clang-format instead of clang-format-14.

Finding the new name yourself

Run a job on runs-on: ubuntu-26.04 and ask apt:

apt-cache policy qemu-user-static
apt-cache showpkg qemu-user-static
apt-cache search --names-only 'webkit.*driver'

showpkg lists what provides a virtual name under "Reverse Provides". You can also search packages.ubuntu.com with the distribution set to resolute, the code name of 26.04. Library packages carry the library's version in their name (libicu78, libxml2-16, libxmlsec1-1), so they change between releases, while -dev packages usually keep theirs.

Or pin the job for now

runs-on: ubuntu-24.04 brings the old names back, as in files-desktop #54 for a clang-format check. It holds until GitHub retires 24.04, so leave a note to come back. Whichever you choose, look at "Set up job": the Runner Image group says ubuntu-26.04 or ubuntu-24.04. A re-run can land on 24.04 and pass until November 19, so a green re-run proves nothing.

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).

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

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