Skip to content

troubles installing cmake 3.28.3 from apt repository

reproduction dockerfile:

FROM ubuntu:22.04

RUN apt update && \
    apt install -y ca-certificates gpg wget && \
    apt clean all && \
    test -f /usr/share/doc/kitware-archive-keyring/copyright || \
    wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null && \
    echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null && \
    apt-get update && \
    test -f /usr/share/doc/kitware-archive-keyring/copyright || \
    rm /usr/share/keyrings/kitware-archive-keyring.gpg && \
    apt-get install kitware-archive-keyring && \
    echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy-rc main' | tee -a /etc/apt/sources.list.d/kitware.list >/dev/null && \
    apt-get update && \
    apt-get install cmake=3.28.3-0kitware1ubuntu22.04.1

error:

The following packages have unmet dependencies:
 cmake : Depends: cmake-data (= 3.28.3-0kitware1ubuntu22.04.1) but 3.29.0-0kitware1ubuntu22.04.1 is to be installed
         Recommends: gcc but it is not going to be installed
         Recommends: make
E: Unable to correct problems, you have held broken packages.

I've fixed it by installing cmake-data=3.28.3-0kitware1ubuntu22.04.1 first. Is it a bug, or intended behaviour?

Edited by nfrmtk
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information