---
type: Article
title: "wkhtmltopdf has no installation candidate: the fix | Marqius"
description: Ubuntu 26.04, Debian 13 and GitHub's ubuntu-latest have no
  wkhtmltopdf package. See why apt fails, and make PDFs again with one step.
resource: https://marqius.com/blog/wkhtmltopdf-no-installation-candidate/
tags:
  - marqius
  - journal
status: stable
sources:
  - id: official-page
    resource: https://marqius.com/blog/wkhtmltopdf-no-installation-candidate/
    last_modified: 2026-11-23T11:10:29.663Z
generated:
  by: process:marqius-site-build
  at: 2026-11-23T13:15:59.953Z
x_marqius:
  language: en
  source_sha256: 4b25b0db5eba74db61050d01f61931a269fa1cc1352630d432d752a7e589d6f7
  extraction: public-main-content
---

wkhtmltopdf migration

# Package 'wkhtmltopdf' has no installation candidate

Ubuntu 26.04, Ubuntu 25.04 and later, and Debian 13 have no wkhtmltopdf package. GitHub's ubuntu-latest runner has used Ubuntu 26.04 since November 2026. Here is why your build stops, and how to start it again with one step.

Marqius November 23, 2026

You run the two lines that always worked:

bash

```
sudo apt-get update
sudo apt-get install -y wkhtmltopdf
```

and the build stops with:

text

```
Package wkhtmltopdf is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'wkhtmltopdf' has no installation candidate
```

apt exits with code 100. Nothing is wrong with your workflow. The package is gone.

## Why it happens

-   wkhtmltopdf's project was archived in January 2023. Its last release is from 2020.
-   Debian removed the package on 5 February 2025. Debian 13 ships without it.
-   Ubuntu followed from 25.04. The reason on Ubuntu's removal ticket reads “upstream dead; depends on qtwebkit”. The last Ubuntu LTS with the package is 24.04.
-   Between 19 October and 19 November 2026, GitHub moved its `ubuntu-latest` label from Ubuntu 24.04 to Ubuntu 26.04. Every workflow that installs wkhtmltopdf with apt stopped in that month.

apt has a second message for this: `E: Unable to locate package wkhtmltopdf`. It means the same thing. Our guide for [installing wkhtmltopdf on Debian 12 or 13](https://marqius.com/blog/install-wkhtmltopdf-debian/) goes step by step.

## Fix it in GitHub Actions

Replace the step that ran `apt-get install wkhtmltopdf` with this one:

yaml

```
- uses: marqiushq/setup-marqius-wkhtmltopdf@v1
  with:
    wkhtmltopdf-names: true
```

The step installs marqius-wkhtmltopdf, which reads wkhtmltopdf's command line and options as they are. With `wkhtmltopdf-names: true`, everything later in the job that runs `wkhtmltopdf` runs it. Your tests, your templates and your options do not change.

It needs no `apt-get`. It works on `ubuntu-26.04`, `ubuntu-24.04`, the ARM64 runners and macOS. Its own test workflow runs on `ubuntu-26.04` and `ubuntu-26.04-arm` every hour.

If your Gemfile has `gem "wkhtmltopdf-binary"`, take it out. Bundler would still install the old gem, which has no build for Ubuntu 26.04. That raises a second error: [`Invalid platform`, and its fix](https://marqius.com/blog/wkhtmltopdf-binary-invalid-platform/).

## Fix it on a server or in a Dockerfile

Debian and Ubuntu, from the signed apt repository:

bash

```
sudo curl -fsSLo /etc/apt/sources.list.d/marqius.sources https://packages.marqius.com/apt/marqius.sources
sudo apt update && sudo apt install marqius-wkhtmltopdf
```

The same, as two lines of a Dockerfile:

dockerfile

```
ADD https://packages.marqius.com/apt/marqius.sources /etc/apt/sources.list.d/
RUN apt-get update && apt-get install -y --no-install-recommends marqius-wkhtmltopdf
```

Alpine has no package either. There `apk add wkhtmltopdf` answers `ERROR: unable to select packages: wkhtmltopdf (no such package)`. These three lines add the signed apk repository and install the program:

Terminal

```
wget -qP /etc/apk/keys https://packages.marqius.com/alpine/marqius.rsa.pub
echo https://packages.marqius.com/alpine >> /etc/apk/repositories
apk add marqius-wkhtmltopdf
```

The program is installed as `marqius-wkhtmltopdf`. To give it the names your code and libraries already use:

bash

```
sudo marqius-wkhtmltopdf install
```

That puts `wkhtmltopdf` and `wkhtmltoimage` in `/usr/local/bin`. `sudo marqius-wkhtmltopdf install --undo` takes them away again.

In a `slim` image that has no fonts, the program stops and prints the line that installs them. On Debian and Ubuntu that line is `apt-get update && apt-get install -y --no-install-recommends fonts-liberation2 fonts-dejavu-core`.

## The next error, if you pin the runner

Many teams fixed this by pinning `runs-on: ubuntu-24.04`. It works today. It brings back a package that is built without patched Qt, so the next PDF comes out with no footer:

text

```
The switch --footer-center, is not support using unpatched qt, and will be ignored.
```

Headers from a file and tables of contents are refused the same way. And GitHub keeps its two newest LTS images only. `ubuntu-22.04` is retired on 17 April 2027.

wkhtmltopdf's own last Linux build was made for Ubuntu 22.04, in May 2023. It has none for 24.04 or 26.04.

## Point your library at it

After `marqius-wkhtmltopdf install`, every library that looks for `wkhtmltopdf` on the PATH finds it. To name the program in a setting, the program's own help gives the line for each library: `marqius-wkhtmltopdf help snappy`, for example. `marqius-wkhtmltopdf help libraries` lists all fifteen.

-   **wicked\_pdf**, in `config/initializers/wicked_pdf.rb`: `config.exe_path = "/usr/local/bin/wkhtmltopdf"`
-   **PDFKit**: `config.wkhtmltopdf = "/usr/local/bin/wkhtmltopdf"`
-   **python-pdfkit**: `config = pdfkit.configuration(wkhtmltopdf="/usr/local/bin/wkhtmltopdf")`
-   **django-wkhtmltopdf**, in `settings.py`: `WKHTMLTOPDF_CMD = "/usr/local/bin/wkhtmltopdf"`
-   **Snappy**: `new Pdf('/usr/local/bin/wkhtmltopdf')`
-   **laravel-snappy**, in `.env`: `WKHTML_PDF_BINARY=/usr/local/bin/wkhtmltopdf`

## Check the result on your own documents

Save a PDF your app makes today. Make the same PDF with Marqius, then compare them:

bash

```
marqius-wkhtmltopdf compare old.pdf new.pdf
```

It lists every difference and names each by its kind: text, number, date, page break, font, spacing. To run the same comparison in every pull request, use the [wkhtmltopdf parity check](https://github.com/marqiushq/wkhtmltopdf-parity-check) action.

## Questions

### Why does `apt-get install wkhtmltopdf` fail on Ubuntu 26.04?

Ubuntu 26.04 has no wkhtmltopdf package. Neither does Ubuntu 25.04, Debian 13 or Alpine. wkhtmltopdf's project was archived in 2023, and the distributions took the package away.

### Is `Unable to locate package wkhtmltopdf` the same problem?

Yes. apt uses that message when its lists have no entry for the package at all, and “has no installation candidate” when they have a reference without a package.

### Can I keep `ubuntu-24.04` instead?

For now. Two things come with it. Ubuntu's package is built without patched Qt, so it ignores headers, footers with page numbers and tables of contents. And GitHub retires its older images: `ubuntu-22.04` goes on 17 April 2027.

### Does the Action change anything else on the runner?

No. Nothing already on the runner changes. The names `wkhtmltopdf` and `wkhtmltoimage` are added for the job only, and only when you ask for them.

### What does it cost?

There are two licences. The Community licence is free: for personal projects, for teaching and learning, and for open-source projects, including their CI test runs and documentation builds. The commercial licence is for businesses. [Plans and licences](https://marqius.com/wkhtmltopdf-buy/)

### Who makes it?

Marqius is commercial software from Simple AI LLC. It is independent of the wkhtmltopdf project. The Action itself is open source under the MIT licence.

## Sources

-   GitHub's notice that `ubuntu-latest` would use Ubuntu 26.04 from October 19, to be finished by November 19, 2026: [https://github.com/actions/runner-images/issues/14748](https://github.com/actions/runner-images/issues/14748)
-   GitHub's notice that `ubuntu-22.04` is unsupported from April 17, 2027: [https://github.com/actions/runner-images/issues/14254](https://github.com/actions/runner-images/issues/14254)
-   Debian's package tracker, with the removal from testing on 5 February 2025: [https://tracker.debian.org/pkg/wkhtmltopdf](https://tracker.debian.org/pkg/wkhtmltopdf)
-   Ubuntu's removal ticket: [https://bugs.launchpad.net/bugs/2100639](https://bugs.launchpad.net/bugs/2100639)
-   wkhtmltopdf's last Linux builds: [https://github.com/wkhtmltopdf/packaging/releases/tag/0.12.6.1-3](https://github.com/wkhtmltopdf/packaging/releases/tag/0.12.6.1-3)
-   The Action: [https://github.com/marqiushq/setup-marqius-wkhtmltopdf](https://github.com/marqiushq/setup-marqius-wkhtmltopdf)
-   The apt and apk repositories: [https://packages.marqius.com](https://packages.marqius.com/)

## Keep reading

[Moving from wkhtmltopdf to Chrome? Check these three things first](https://marqius.com/blog/wkhtmltopdf-to-puppeteer/) [wkhtmltopdf: libssl.so.1.1: cannot open shared object file](https://marqius.com/blog/wkhtmltopdf-libssl-so-1-1/) [Invalid platform, must be running on Ubuntu 16.04/18.04/20.04/22.04…](https://marqius.com/blog/wkhtmltopdf-binary-invalid-platform/) [All journal guides](https://marqius.com/blog/)

Source for this page [^official-page].

[^official-page]: https://marqius.com/blog/wkhtmltopdf-no-installation-candidate/

[Browse this section](index.md) · [Knowledge index](../index.md)
