# APT repo not working for Ubuntu 22.04/24/04 anymore (package kitware-archive-keyring)

**URL:** https://discourse.cmake.org/t/apt-repo-not-working-for-ubuntu-22-04-24-04-anymore-package-kitware-archive-keyring/15684
**Category:** Community
**Created:** [May 28, 2026, 11:58am UTC](https://discourse.cmake.org/t/apt-repo-not-working-for-ubuntu-22-04-24-04-anymore-package-kitware-archive-keyring/15684 "2026-05-28T11:58:15Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![exoosh](https://discourse.cmake.org/user_avatar/discourse.cmake.org/exoosh/32/4077_2.png) [@exoosh](https://discourse.cmake.org/u/exoosh)
#### Post date: [May 28, 2026, 11:58am UTC](https://discourse.cmake.org/t/apt-repo-not-working-for-ubuntu-22-04-24-04-anymore-package-kitware-archive-keyring/15684/1 "2026-05-28T11:58:15Z")

</div>

Hi, internally we’re using a different script, but I reproduced the exact same behavior with [kitware-archive.sh](https://apt.kitware.com/kitware-archive.sh).

The error is quite clear:

```auto
Get:1 https://apt.kitware.com/ubuntu jammy/main amd64 kitware-archive-keyring all 2025.06.23 [28.2 kB]
Err:1 https://apt.kitware.com/ubuntu jammy/main amd64 kitware-archive-keyring all 2025.06.23
  File has unexpected size (28052 != 28184). Mirror sync in progress? [IP: 66.194.253.25 443]
  Hashes of expected file:
   - SHA512:46cf00f34d64d17b34b0bdf683ce1dca0c65c95fd4227a7b4b79feba2e23ac49d5863e5d7e7c39773882d1c029a4c52ed51a831b3aa16c86641b762dd30d7634
   - SHA256:576bb5fdecb03ed13379bdecc79cab825849c339032bdc5c3753925efe3b36b5
   - SHA1:492aeb62fd7e1484e50fb491181eda89a13e8643 [weak]
   - MD5Sum:3a887eb7114a7e07a118b80aae438e95 [weak]
   - Filesize:28184 [weak]
E: Failed to fetch https://apt.kitware.com/ubuntu/pool/main/k/kitware-archive-keyring/kitware-archive-keyring_2025.06.23_all.deb File has unexpected size (28052 != 28184). Mirror sync in progress? [IP: 66.194.253.25 443]
   Hashes of expected file:
    - SHA512:46cf00f34d64d17b34b0bdf683ce1dca0c65c95fd4227a7b4b79feba2e23ac49d5863e5d7e7c39773882d1c029a4c52ed51a831b3aa16c86641b762dd30d7634
    - SHA256:576bb5fdecb03ed13379bdecc79cab825849c339032bdc5c3753925efe3b36b5
    - SHA1:492aeb62fd7e1484e50fb491181eda89a13e8643 [weak]
    - MD5Sum:3a887eb7114a7e07a118b80aae438e95 [weak]
    - Filesize:28184 [weak]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

```

~~Nothing similar happens for Ubuntu 24.04.~~

Correction: for `kitware-archive-keyring_2025.06.23_all.deb` this happens all the same on Ubuntu 24.04.

---

<div class="post-metadata">

### Author: ![exoosh](https://discourse.cmake.org/user_avatar/discourse.cmake.org/exoosh/32/4077_2.png) [@exoosh](https://discourse.cmake.org/u/exoosh)
#### Post date: [May 28, 2026, 12:54pm UTC](https://discourse.cmake.org/t/apt-repo-not-working-for-ubuntu-22-04-24-04-anymore-package-kitware-archive-keyring/15684/2 "2026-05-28T12:54:56Z")

</div>

```auto
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.4 LTS
Release: 24.04
Codename: noble
$ sudo apt install kitware-archive-keyring
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  kitware-archive-keyring
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 28.2 kB of archives.
After this operation, 46.1 kB of additional disk space will be used.
Get:1 https://apt.kitware.com/ubuntu noble/main amd64 kitware-archive-keyring all 2025.06.23 [28.2 kB]
Err:1 https://apt.kitware.com/ubuntu noble/main amd64 kitware-archive-keyring all 2025.06.23
  File has unexpected size (28052 != 28184). Mirror sync in progress? [IP: 66.194.253.25 443]
  Hashes of expected file:
   - SHA512:46cf00f34d64d17b34b0bdf683ce1dca0c65c95fd4227a7b4b79feba2e23ac49d5863e5d7e7c39773882d1c029a4c52ed51a831b3aa16c86641b762dd30d7634
   - SHA256:576bb5fdecb03ed13379bdecc79cab825849c339032bdc5c3753925efe3b36b5
   - SHA1:492aeb62fd7e1484e50fb491181eda89a13e8643 [weak]
   - MD5Sum:3a887eb7114a7e07a118b80aae438e95 [weak]
   - Filesize:28184 [weak]
E: Failed to fetch https://apt.kitware.com/ubuntu/pool/main/k/kitware-archive-keyring/kitware-archive-keyring_2025.06.23_all.deb File has unexpected size (28052 != 28184). Mirror sync in progress? [IP: 66.194.253.25 443]
   Hashes of expected file:
    - SHA512:46cf00f34d64d17b34b0bdf683ce1dca0c65c95fd4227a7b4b79feba2e23ac49d5863e5d7e7c39773882d1c029a4c52ed51a831b3aa16c86641b762dd30d7634
    - SHA256:576bb5fdecb03ed13379bdecc79cab825849c339032bdc5c3753925efe3b36b5
    - SHA1:492aeb62fd7e1484e50fb491181eda89a13e8643 [weak]
    - MD5Sum:3a887eb7114a7e07a118b80aae438e95 [weak]
    - Filesize:28184 [weak]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

```

---

<div class="post-metadata">

### Author: ![exoosh](https://discourse.cmake.org/user_avatar/discourse.cmake.org/exoosh/32/4077_2.png) [@exoosh](https://discourse.cmake.org/u/exoosh)
#### Post date: [May 28, 2026, 3:27pm UTC](https://discourse.cmake.org/t/apt-repo-not-working-for-ubuntu-22-04-24-04-anymore-package-kitware-archive-keyring/15684/3 "2026-05-28T15:27:51Z")

</div>

Yep, started breaking our CI without any other moving parts. So I guess I am not dreaming that up.

---

<div class="post-metadata">

### Author: ![exoosh](https://discourse.cmake.org/user_avatar/discourse.cmake.org/exoosh/32/4077_2.png) [@exoosh](https://discourse.cmake.org/u/exoosh)
#### Post date: [May 28, 2026, 5:32pm UTC](https://discourse.cmake.org/t/apt-repo-not-working-for-ubuntu-22-04-24-04-anymore-package-kitware-archive-keyring/15684/4 "2026-05-28T17:32:18Z")

</div>

Seems to be fixed now as per [https://gitlab.kitware.com/cmake/cmake/-/work\_items/27852](https://gitlab.kitware.com/cmake/cmake/-/work_items/27852)

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [May 28, 2026, 6:47pm UTC](https://discourse.cmake.org/t/apt-repo-not-working-for-ubuntu-22-04-24-04-anymore-package-kitware-archive-keyring/15684/5 "2026-05-28T18:47:24Z")

</div>

> [@exoosh](#):
>
> breaking our CI

FWIW, we do not recommend using `apt.kitware.com` to install packages in CI jobs. The [GitHub-hosted release](https://github.com/Kitware/CMake/releases) binary tarballs can be easily extracted, are relocatable, and are hosted with a CDN.

---

<div class="post-metadata">

### Author: ![exoosh](https://discourse.cmake.org/user_avatar/discourse.cmake.org/exoosh/32/4077_2.png) [@exoosh](https://discourse.cmake.org/u/exoosh)
#### Post date: [May 29, 2026, 9:35am UTC](https://discourse.cmake.org/t/apt-repo-not-working-for-ubuntu-22-04-24-04-anymore-package-kitware-archive-keyring/15684/6 "2026-05-29T09:35:07Z")

</div>

Hi Brad, thanks for the clarification. I really dislike using unpackaged software in a package-managed environment, so I’d gladly use the APT repo anytime. But since you stated it this way, I think I’ll have a look at how I can integrate it in the script parts (which I maintain) that will make CMake and other stuff available.

But the joke’s still on us regarding the broken CI, because technically the colleagues who run the CI processes should IMO use an APT caching proxy of sorts. There are enough ways to decouple from external resources while also keeping an eye on the use of said external resources. My remark was more meant as confirmation, [because I reported another “issue” in January which turned out to be PEBKAC](https://discourse.cmake.org/t/ubuntu-24-04-complains-about-unknown-key-used-for-signature-on-apt-kitware-com/15454/4).

Also noticed the `apt.kitware.com` page changed ever so slightly overnight 😁 (and yeah I confirmed this hadn’t been mentioned before):

> This repository is intended for developers to install packages on their own machines. **Please do not use this apt repository in CI jobs.** Our official [release](https://github.com/Kitware/CMake/releases) binaries are hosted by GitHub’s CDN.

Side-note: the script which _does_ use the APT repo is in fact geared to developers. In fact to manual preparation of a developer machine. It was co-opted by our CI folks into their process, because it’s so convenient.

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [May 29, 2026, 1:15pm UTC](https://discourse.cmake.org/t/apt-repo-not-working-for-ubuntu-22-04-24-04-anymore-package-kitware-archive-keyring/15684/7 "2026-05-29T13:15:07Z")

</div>

> [@exoosh](#):
>
> dislike using unpackaged software in a package-managed environment

Certainly the binary tarballs shouldn’t be extracted to a distro-managed prefix like `/usr`.

In CMake’s own CI we extract to a path inside the job’s work tree and add it to the `PATH`.

---

<div class="post-metadata">

### Author: ![exoosh](https://discourse.cmake.org/user_avatar/discourse.cmake.org/exoosh/32/4077_2.png) [@exoosh](https://discourse.cmake.org/u/exoosh)
#### Post date: [May 29, 2026, 1:58pm UTC](https://discourse.cmake.org/t/apt-repo-not-working-for-ubuntu-22-04-24-04-anymore-package-kitware-archive-keyring/15684/8 "2026-05-29T13:58:07Z")

</div>

Yep, that’s what I thought. The GitHub API/download throttling is the only thing I need to keep in mind.

Do you follow rules for the naming of the assets and if so, where are they documented?

Thanks.

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [May 29, 2026, 2:10pm UTC](https://discourse.cmake.org/t/apt-repo-not-working-for-ubuntu-22-04-24-04-anymore-package-kitware-archive-keyring/15684/9 "2026-05-29T14:10:49Z")

</div>

> [@exoosh](#):
>
> Do you follow rules for the naming of the assets and if so, where are they documented?

The release assets are generated automatically by a CI pipeline. One can see the [artifact patterns](https://gitlab.kitware.com/cmake/cmake/-/blob/v4.3.3/.gitlab/artifacts.yml#L113-124) after an “Any packages made” comment.

FWIW, CMake’s own CI jobs never look for future versions of anything. We always download fixed versions with known asset names and hashes. We update to new versions by changing those specs.
