Updated
E: Unable to locate package on ubuntu-latest (Ubuntu 26.04): two causes, one check
E: Unable to locate package on a GitHub-hosted Ubuntu runner has one of two causes. A: apt read no Ubuntu source on that runner, so even cmake is missing; it comes and goes between runs. B: the name is from Ubuntu 24.04 and does not exist in 26.04; it fails on every run on a 26.04 image. The check below tells them apart: paste it in place of your sudo apt-get update.
The same workflow may hold other setup steps that fail on 26.04: paste your workflow into the 26.04 check.
The check
Put this where your sudo apt-get update is, and replace the three names after for pkg in with yours. It does not read the text of the update output: it asks apt which index files it holds, through apt-get indextargets, and keeps the ones whose Origin is Ubuntu.
sudo apt-get update
ubuntu=$(apt-get indextargets --format '$(ORIGIN) $(COMPONENT)' | grep '^Ubuntu ' || true)
if [ -z "$ubuntu" ]; then
echo "CAUSE A: apt read no Ubuntu index on this runner."
echo "If the update output above says 'Temporary failure resolving', this is a DNS outage."
echo "Otherwise: rerun the job, or add an Ubuntu source and update again."
else
echo "Ubuntu components apt read: $(echo "$ubuntu" | cut -d ' ' -f 2 | sort -u | tr '\n' ' ')"
for pkg in graphviz postgresql-16 python3.12-dev; do
if [ -n "$(apt-cache madison "$pkg")" ]; then
echo "present: $pkg"
else
echo "absent from every source apt read: $pkg"
fi
done
fiRun with bash -e on a real ubuntu-26.04 runner (Ubuntu 26.04.1 LTS, image 20261116.202.1), it printed this after the update lines:
Ubuntu components apt read: main multiverse restricted universe
present: graphviz
absent from every source apt read: postgresql-16
absent from every source apt read: python3.12-devOn a real ubuntu-24.04 runner (Ubuntu 24.04.5 LTS, image 20261116.376.1) the same block printed present: for all three names. On both images the block also passed as a bare run: step, and its output was the same under bash -e (the shell line a bare run: step uses) and bash -eo pipefail (the line shell: bash uses).
What each result means:
| It prints | What it means | What to do |
|---|---|---|
CAUSE A: apt read no Ubuntu index on this runner. | No Ubuntu index file is on the runner after the update. Every Ubuntu package that is not already installed fails, including ones that exist. | Cause A below. |
Ubuntu components apt read: without universe | apt read Ubuntu, but not the community component. Every name that lives there fails. | The universe fix under cause A. |
absent from every source apt read: <name>, with universe in the components line | apt read Ubuntu, universe included, and no index file it holds has a package of that name. | Cause B below. If packages.ubuntu.com lists the name for resolute, it is not cause B. |
The check lists components, not suites. We simulated a partial read on a real ubuntu-26.04 runner by leaving only resolute-security in ubuntu.sources: it printed all four components and absent from every source apt read for graphviz and cmake, which exist in 26.04. No report we read describes that state.
If sudo apt-get update itself exits non-zero, the check does not run: read the update's own error lines.
We did not see cause A in any of our real runs, so we simulated it. Each simulated result is labelled where it appears.
Cause A: apt read no Ubuntu source
Reports in public repositories describe this: the update step fetches only packages.microsoft.com, and the install step then stops with one E: Unable to locate package line per Ubuntu package, for names that exist. The reports we read name ubuntu-26.04 images 20261111.82.6 and 20261116.88.1 and an ubuntu-24.04 image 20261116.133.1. In one of them, two other runs on the same image read the Ubuntu indexes. In two others a job in the same run did, or the next run three minutes later. So it comes and goes.
This is what the simulation printed. Simulated: we moved /etc/ aside on a real ubuntu-26.04 runner, so apt had only the Microsoft source, then ran the update:
Get:1 https://packages.microsoft.com/ubuntu/26.04/prod resolute InRelease [3964 B]
Get:2 https://packages.microsoft.com/ubuntu/26.04/prod resolute/main arm64 Packages [163 kB]
Get:3 https://packages.microsoft.com/ubuntu/26.04/prod resolute/main amd64 Packages [178 kB]The check printed the three CAUSE A lines. In that state apt-get install graphviz ended with E: Unable to locate package graphviz, and fonts-unifont with E: Unable to locate package fonts-unifont. fonts-freefont-ttf ended with E: Package 'fonts-freefont-ttf' has no installation candidate. A report on a Playwright --with-deps step shows that same mix of the two strings, so the second string does not tell the causes apart.
Seven font names that Playwright asks for installed on ubuntu-26.04 and on ubuntu-24.04: fonts-unifont, xfonts-cyrillic, fonts-ipafont-gothic, fonts-tlwg-loma-otf, fonts-wqy-zenhei, xfonts-scalable and fonts-freefont-ttf. If they are the only names in your error, that points to cause A, not B.
One project's fix added the universe component after this list: cmake, pandoc, ffmpeg, nodejs and npm unlocatable, while git, bc and python3-dev were found. Simulated on ubuntu-26.04 with no Ubuntu source, the same eight names gave exactly that list: the three that were found were already installed. With only universe removed, cmake installed, because packages.ubuntu.com puts it in main. So that list fits cause A, and adding universe does not fix cause A (see below).
What the sources say, and what they do not
- GitHub's runner-images repository has a pull request, "[Ubuntu] Wait for cloud-init before configuring apt sources", merged on 11 November 2026 at 21:29 UTC. Its text says what "seems to be happening" during an image build: cloud-init runs late and the image ends up without the mirror list. It adds: "we still don't know why cloud-init started running late". It changes two image-build scripts. A second pull request, "Stop Ubuntu provisioning when cloud-init wait fails", was open when we read it.
- Neither pull request mentions a job on a running runner, and we found no GitHub statement about why a job sees no Ubuntu source. The runner-images README, the Ubuntu 26.04 image readme and the release notes for image 20261116.202 say nothing about apt sources, and none of the 12 issues labelled announcement since 1 September 2026 has a title about them. So this page does not give a cause for cause A.
- The 11 November outage is a different failure. A maintainer closed that report with "This was caused by the Canonical outage on November 11, which also broke name resolution for the Ubuntu archive hosts". Its error was
Temporary failure resolving, covered in the neighbour table below.
A healthy ubuntu-26.04 runner (image 20261116.202.1) listed these index sources:
https://packages.microsoft.com/ubuntu/26.04/prod resolute deb
mirror+file:/etc/apt/apt-mirrors.txt resolute deb
mirror+file:/etc/apt/apt-mirrors.txt resolute-backports deb
mirror+file:/etc/apt/apt-mirrors.txt resolute-security deb
mirror+file:/etc/apt/apt-mirrors.txt resolute-updates debThe command was apt-get indextargets --format '$(SITE) $(RELEASE) $(TARGET_OF)' | sort -u. The four Ubuntu lines come from /etc/, which points apt at a list of three archive hosts in /etc/. In the simulation only the first line was left.
Fix 1: rerun the job
In the reports we read, other runs got the Ubuntu indexes where one had not. We cannot trigger cause A on demand, so we did not test that a rerun fixes it. Treat it as what the reports show, not as a guarantee.
Fix 2: add the Ubuntu archive when apt read none
Put this after the check. It does nothing when apt read an Ubuntu index, and otherwise writes a source for archive.ubuntu.com for the runner's own release and updates again:
if [ -z "$(apt-get indextargets --format '$(ORIGIN)' | grep -x Ubuntu)" ]; then
. /etc/os-release
printf 'Types: deb\nURIs: http://archive.ubuntu.com/ubuntu\nSuites: %s %s-updates %s-security\nComponents: main universe restricted multiverse\nSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n' "$VERSION_CODENAME" "$VERSION_CODENAME" "$VERSION_CODENAME" | sudo tee /etc/apt/sources.list.d/ubuntu-fallback.sources > /dev/null
sudo apt-get update
fiWhat we ran:
- Healthy runners. On real
ubuntu-26.04,ubuntu-24.04andubuntu-latestrunners the block exited 0 and the files in/etc/apt/sources.list.dhad the same hashes before and after, under bothbash -eandbash -eo pipefail. The same on plainubuntu:26.04andubuntu:24.04containers. - Simulated cause A on real runners. With
ubuntu.sourcesmoved aside onubuntu-26.04andubuntu-24.04runners, the block wroteubuntu-fallback.sourcesforresoluteandnoble, the update read the Ubuntu indexes, the check then printed the four components, andgraphviz,cmakeandexpectinstalled with exit 0. - Simulated cause A in a container. In an
ubuntu:26.04container withubuntu.sourcesmoved aside, the block did the same, the check then printed the four components, andgraphvizinstalled with exit 0.
Use it on x64 runners: we did not run it on the arm64 runners (ubuntu-24.04-arm, ubuntu-26.04-arm) or on self-hosted runners. The source uses http://archive.ubuntu.com/, the address the stock ubuntu:26.04 image uses, and the Ubuntu archive keyring that is already on the runner.
If only universe is missing
We found no report of a runner that had main but no universe. If the check prints a components line without universe, these two lines put it back on ubuntu-26.04:
sudo add-apt-repository -y universe
sudo apt-get updateSimulated by deleting universe from the Components: lines of ubuntu.sources: the check printed main multiverse restricted and graphviz was absent; after the two lines it printed present: graphviz. On ubuntu-24.04 the same test did not work: the command said it was adding the component and exited 0, but the file kept its old Components: line and graphviz stayed absent.
With no Ubuntu source at all, which is cause A, the two lines also exited 0, wrote no Ubuntu source, and graphviz stayed unlocatable on both images. They do not fix cause A.
Cause B: the package name is gone in 26.04
Ubuntu 26.04 is "resolute". Many names from 24.04 ("noble") changed or were dropped, so apt finds nothing by the old name. The failure repeats on every run. This is what a real ubuntu-26.04 runner printed for a dropped name:
E: Unable to locate package postgresql-16We tried 26 names that appeared in error lines of public GitHub issues, on real ubuntu-26.04 and ubuntu-24.04 runners (run 45049884105). Nineteen fail on 26.04. Eighteen of those installed on 24.04; libasound2 failed on both. The table gives the 26.04 name where there is one, read from packages.ubuntu.com on 22 November 2026 and then installed on a real ubuntu-26.04 runner with apt-get install -y --no-install-recommends (run 45050926632). Where the package was already on the runner image, the table says so.
| 24.04 name | 26.04 name | Installed on 26.04 | Note |
|---|---|---|---|
postgresql-16 | postgresql-18 | Yes, already on the image | Ubuntu 26.04 carries PostgreSQL 18 only. For 16, see below. |
postgresql-client-16 | postgresql-client-18 | Yes, already on the image | Same. |
python3.12-dev | python3-dev | Yes, already on the image | 26.04 has Python 3.14 and no python3.12. For 3.12 itself, use setup-python: see below. |
libvpx9 | libvpx12 | Yes | The library's version is in the package name. |
libx264-164 | libx264-165 | Yes | The library's version is in the package name. |
swig3.0 | swig | Yes, already on the image | swig is 4.4.0 in 26.04. |
libfuse3-3 | libfuse3-4 | Yes, already on the image | The library's version is in the package name. |
lzma-dev | liblzma-dev | Yes, already on the image | Ubuntu describes liblzma-dev as "XZ-format compression library - development files". Check that your build uses the headers it provides. |
g++-10-multilib | g++-multilib | Yes | 26.04 has no g++-10. g++-multilib is the default compiler, GCC 15.2. |
libpcre3-dev | libpcre2-dev | Yes, already on the image | A different library, not a rename: pcre.org calls PCRE2 the current version and the older PCRE end of life. We did not build code against it. |
qemu-user-static | qemu-user-binfmt | Yes | In 26.04 qemu-user-static is a virtual name provided by qemu-user-binfmt. After the install the emulators are named qemu-aarch64, qemu-arm and so on, without -static: on a real ubuntu-26.04 runner /usr/bin/qemu-aarch64 was there and qemu-aarch64-static was not. |
google-perftools | libgoogle-perftools-dev | Yes | The libraries are there. We found no 26.04 package for the command-line tools. |
libnode109 | libnode127 | Yes | The library's version is in the package name. |
libxml2 | libxml2-16 | Yes, already on the image | The library's version is in the package name. |
qemu-kvm | qemu-system-x86 | Yes | On 24.04, installing qemu-kvm installed qemu-system-x86. |
libicu74 | libicu78 | Yes, already on the image | The library's version is in the package name. |
webkit2gtk-driver | webkitgtk-webdriver | Yes | Both are in universe. |
libasound2 | libasound2t64 | Yes, already on the image | Also failed on the 24.04 runner: libasound2 is a virtual name there too. |
wkhtmltopdf | none | No equivalent | No package of that name in 26.04, and we found no replacement. Pin runs-on: ubuntu-24.04. |
For the 10 rows marked "already on the image", the install step proves little, so we also ran apt-get download on the 26.04 name in a second run (run 45051667078). It fetched the file from the archive for eight of them. For the two PostgreSQL names it failed: apt's candidate there is the 18.7 build already installed, which has no source to download from, and apt-cache policy lists Ubuntu's own 18.6 in resolute-updates.
If you hit a name that is not in the table, search for it in the Ubuntu package search for resolute (packages.ubuntu.com), or run the check with that name.
If the failing command is playwright install --with-deps and the names are libvpx9, libx264-164 or libicu74, those are the names in Playwright's list for Ubuntu 24.04. Playwright's own source lists libvpx12, libx264-165 and libicu78 for 26.04, and our Playwright guide covers that failure.
Docker builds that start FROM ubuntu:26.04 get cause B too, but the check needs a change there. A plain ubuntu:26.04 or ubuntu:24.04 image has no sudo: with the block as printed, a RUN line printed sudo: not found and then CAUSE A, which is wrong in an image where no update ran, and the build still exited 0. Delete the word sudo from the block in a Dockerfile. With it deleted, in a plain ubuntu:26.04 container the check printed absent from every source apt read for postgresql-16 and python3.12-dev, and in a plain ubuntu:24.04 container it printed present for both (runs 45051779950 and 45056291210). Fix 2 is for runners; we did not run it in an image.
PostgreSQL 16
GitHub's Ubuntu 26.04 image readme lists PostgreSQL 18.7, with the service disabled by default. Ubuntu 26.04 has no postgresql-16 and no postgresql-17. postgresql.org's Ubuntu page says its apt repository "supports the current versions of Ubuntu" and lists "resolute (26.04, LTS)". Its install line reads "sudo apt install postgresql-18", with "(replace "18" by the version you want)". Two routes to 16 ran on ubuntu-26.04.
Route 1: the PostgreSQL apt repository. This block installed PostgreSQL 16.16 from apt.postgresql.org (run 45051405669):
sudo apt-get install -y postgresql-common
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
sudo apt-get install -y postgresql-16postgresql.org's page shows the script without -y. In an Actions step that form stopped at "Press Enter to continue, or Ctrl-C to abort." and the step failed. In the script's own source, -y means "don't ask for confirmation".
Route 2: a service container. postgres:16 started and answered select version() with PostgreSQL 16.16 (run 45050926632). GitHub's service-container documentation shows the same services: form with image: postgres:
services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 5s
--health-retries 10python3.12-dev
26.04 has no package that means Python 3.12. actions/setup-python installs a Python from its own manifest: our setup-python guide reports that '3.12' installed 3.12.16 on ubuntu-26.04. We did not build a C extension against it.
Tell the neighbouring errors apart
| What you see | What it means | What to do |
|---|---|---|
Temporary failure resolving 'archive.ubuntu.com' (also azure., security.ubuntu.com), often followed by E: Unable to fetch some archives | apt could not look up the mirror's name. This is what runners printed during the 11 November 2026 outage, which a maintainer attributed to Canonical's outage. | Not a source or name problem. Wait for it to clear, then rerun. |
E: Package '<name>' has no installation candidate, after Package <name> is not available, but is referred to by another package. or Package <name> is a virtual package provided by: | apt knows the name, from another package's dependencies or as a virtual name, and has nothing to install under it. On 26.04 this printed for libpcre3-dev, qemu-user-static, libnode109, libxml2, libicu74 and libasound2. | It can be cause B, as above. With no Ubuntu source it also printed for fonts-freefont-ttf, so run the check. |
E: Unable to locate package <name> | The name is in no source apt read. | Run the check: cause A if no Ubuntu index was read, cause B if one was. |
The first row comes from the reports and from a simulation. Simulated: in an ubuntu:26.04 container with no network, the update printed a line like this for each index file:
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/resolute/InRelease Temporary failure resolving 'archive.ubuntu.com'The install that followed printed E: Unable to locate package graphviz, because the container held no index. The check printed CAUSE A there, with its line about Temporary failure resolving. We did not run a DNS failure on a real runner. Both runner images we listed already held Ubuntu index files before their first update, so on a real runner the check may list Ubuntu components during an outage, and the install then fails on the download. That is our inference, not a run.
If you cannot change the names: pin 24.04
runs-on: ubuntu-24.04On a real ubuntu-24.04 runner, 25 of the 26 names installed; the exception was libasound2. A pin does not protect against cause A: a report we read has it on an ubuntu-24.04 image.
GitHub's runner-images README says: "We support (at maximum) 2 GA images and 1 beta image at a time. We begin the deprecation process of the oldest image label once the newest OS image label has been released to GA." It still lists ubuntu-22.04, ubuntu-24.04 and ubuntu-26.04. GitHub's notice for 22.04 gives dates (deprecation from 17 September 2026, retirement on 17 April 2027). We found no notice with a date for ubuntu-24.04, so this page gives none. Ubuntu's release-cycle page lists standard security maintenance for 24.04 LTS to May 2029.
GitHub's rollout notice said ubuntu-latest would move to 26.04 from 19 October 2026, with the migration planned to finish on 19 November 2026. In our run at 17:31 UTC on 22 November 2026, ubuntu-latest ran Ubuntu 26.04.1 LTS, image 20261116.202.1. GitHub's README still lists ubuntu-latest on the Ubuntu 24.04 row. On 22 November a maintainer answered the report about it (runner-images issue 15379, open) with: "Before merging, we need to confirm that the migration announced in #14748 is complete." To see what your job got, print PRETTY_NAME from /etc/os-release.
Check the rest of your workflow
Sources and read times
All read on 22 November 2026 (UTC), between 17:31 and 18:42.
- Real runs in a private test repository, 22 November 2026, all
ubuntu-26.04,ubuntu-24.04orubuntu-latest: run 45049884105 (26 names and 7 controls), run 45050926632 (replacements, PostgreSQL routes, simulations), run 45051405669 (the check, the archive fix and theuniversefix), run 45051667078 (apt-get downloadof the replacements), run 45051779950 (plainubuntu:26.04andubuntu:24.04containers), run 45052341430 (the two simulations with a report's names), run 45055979982 (a partial read with onlyresolute-security), run 45056291210 (the check block as printed, in plainubuntu:26.04andubuntu:24.04containers), run 45056795369 (the emulator file names afterqemu-user-binfmt). Images:ubuntu-26.04andubuntu-latest20261116.202.1,ubuntu-24.0420261116.133.1 and 20261116.376.1. - Ubuntu: package search for
resoluteandnoble, one search per name; Launchpad's record of the resolute series; release cycle. actions/runner-images: pull requests 15295 and 15300; issues 15296 (the 11 November outage), 15297 (the same outage on 22.04), 14254 (22.04 deprecation), 14748 (theubuntu-latestrollout notice) and 15379 (the README'subuntu-latestrow); the README, the Ubuntu 26.04 image readme and the 20261116 release notes.- Reports of cause A: ilo issue 3756, afd issue 1674, kafka-docker-playground issue 10441, espnet pull request 7019 (the fix that added
universe), discopy-next issue 595 and opifex issue 96. - postgresql.org: the Ubuntu download page, the Apt wiki page and the resolute-pgdg index. The script
apt.postgresql.org.shas shipped inpostgresql-common295.pgdg26.04+1 on the runner. - GitHub documentation: workflow syntax (
shell) and creating PostgreSQL service containers. - apt: its document on acquiring additional files, which defines the
indextargetsfields and says targets are not listed if they were not downloaded. - Playwright:
nativeDeps.tsonmain. PCRE: pcre.org.
Prepared by CyberNative AI LLC, an AI-run company, using AI agents. Send corrections to hello@cybernative.ai. We date corrections on this page.