# APT Repository Broken

**URL:** https://discourse.cmake.org/t/apt-repository-broken/6217
**Category:** Development
**Created:** [August 4, 2022, 5:49pm UTC](https://discourse.cmake.org/t/apt-repository-broken/6217 "2022-08-04T17:49:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sebastient](https://discourse.cmake.org/user_avatar/discourse.cmake.org/sebastient/32/2653_2.png) [@sebastient](https://discourse.cmake.org/u/sebastient)
#### Post date: [August 4, 2022, 5:49pm UTC](https://discourse.cmake.org/t/apt-repository-broken/6217/1 "2022-08-04T17:49:22Z")

</div>

The [apt.kitware.com](http://apt.kitware.com) for at least focal is broken currently, looks like cmake-data 2.24.0 is premature and missing. Using focal-rc works with 2.24.0~rc5 so it is specific to the “stable” version of the repository.

```auto
sudo apt install cmake
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 cmake : Depends: cmake-data (= 3.23.2-0kitware1ubuntu20.04.1) but 3.24.0-0kitware1ubuntu20.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.

```

---

<div class="post-metadata">

### Author: ![kyle.edwards](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)
#### Post date: [August 4, 2022, 5:53pm UTC](https://discourse.cmake.org/t/apt-repository-broken/6217/2 "2022-08-04T17:53:31Z")

</div>

Our build server is currently in the process of building CMake for several architectures and Ubuntu versions. Sometimes the `cmake-data` package becomes available before the `cmake` package, because `cmake-data` has the `all` architecture, so it only needs to be built once, whereas the `cmake` package needs to be built for every architecture. Please be patient - the rest of the packages should be available later today.

---

<div class="post-metadata">

### Author: ![sebastient](https://discourse.cmake.org/user_avatar/discourse.cmake.org/sebastient/32/2653_2.png) [@sebastient](https://discourse.cmake.org/u/sebastient)
#### Post date: [August 4, 2022, 6:09pm UTC](https://discourse.cmake.org/t/apt-repository-broken/6217/3 "2022-08-04T18:09:46Z")

</div>

Could the build server be setup to not publish until all the artifacts are ready? This breaks any automated builds which pull cmake packages.

---

<div class="post-metadata">

### Author: ![rsarrazin](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/r/ecb155/32.png) [@rsarrazin](https://discourse.cmake.org/u/rsarrazin)
#### Post date: [August 25, 2022, 9:27am UTC](https://discourse.cmake.org/t/apt-repository-broken/6217/4 "2022-08-25T09:27:06Z")

</div>

The same problem has happened again (`cmake : Depends: cmake-data (= 3.24.0-0kitware1ubuntu20.04.1) but 3.24.1-0kitware1ubuntu20.04.1 is to be installed`). It looks like the `cmake` package requires an unspecified version of `cmake-data`, hence getting its latest version instead of the matching one.

I worked around this by installing `cmake-data` beforehand while stating the same version, e.g. `export CMAKE_VERSION=3.24.0-0kitware1ubuntu20.04.1 && apt-get -y install --no-install-recommends cmake-data=$CMAKE_VERSION cmake=$CMAKE_VERSION`.
