Libdrm old version

Hi,

I have package that depends on libdrm2. But it seems the one in the toradex feed is not yet the correct version. I get:

 apt-get install libdrm2
Reading package lists... Done
Building dependency tree... Done
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:
 libdrm2 : Depends: libdrm-common (>= 2.4.104-1) but 2.4.102-1+toradex1 is to be installed
E: Unable to correct problems, you have held broken packages.

I’ve checked the latest snapshot (20220715T123302Z) and it also has version 2.4.102.

Best regards
Chris

Hi @sirhc !

Could you please share more information?

  • Which exact Colibri iMX6 module and version are you using?
  • Which OS are you using on the module? And which version?
  • Is this issue happening on the module (e.g. you are trying to install some package on the module) or this issue is happening on your computer (e.g. you are facing this problem while using VSCode)?

Best regards,

Hi Henrique,

I was using a Colibri imx6 DL 512MB V1.1A. I’ve used this Docker file as a startpoint.

https://github.com/toradex/debian-docker-images/blob/bullseye/base/Dockerfile

I have added libdrm2 and some other packages to a RUN apt-get install command. When building the image i get:

The following packages have unmet dependencies:
 libdrm2 : Depends: libdrm-common (>= 2.4.104-1) but 2.4.102-1+toradex1 is to be installed
E: Unable to correct problems, you have held broken packages.

On the module ofcourse I get the same unmet dependency error when I do an apt-get install libdrm2.

Best regards,
Chris

Hi @sirhc !

As it is on Dockerfile, could you please share a minimal Dockerfile that reproduces the issue?

Best regards,

Hi Henrique,

I took out some of the other files which you don’t need., but as a very bare minimum:

ARG IMAGE_ARCH=linux/arm/v7
# For arm64v8 use:
# ARG IMAGE_ARCH=linux/arm64/v8
ARG IMAGE_TAG=bullseye-slim
# ARG DEBIAN_SNAPSHOT=20210408T000000Z
ARG TORADEX_SNAPSHOT=20220512T021145Z
ARG USE_TORADEX_SNAPSHOT=1
ARG ADD_TORADEX_REPOSITORY=1
FROM --platform=$IMAGE_ARCH debian:$IMAGE_TAG AS base

ARG DEBIAN_FRONTEND=noninteractive
ONBUILD ARG DEBIAN_FRONTEND=noninteractive

# Debian Bullseye is not yet a stable distribution at the moment of this writing;
# therefore its package list may change in incompatible ways with Torizon software.
# Let's lock Torizon containers to a known snapshot of the Bullseye package list as a workaround.
# ARG DEBIAN_SNAPSHOT
# RUN echo "deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/$DEBIAN_SNAPSHOT bullseye main\n\
# deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/$DEBIAN_SNAPSHOT bullseye-updates main\n\
# deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/$DEBIAN_SNAPSHOT bullseye-security main" >/etc/apt/sources.list

# Upgrade & install required packages
RUN apt-get update \
    && apt-get upgrade -y \
    && apt-get install -y --no-install-recommends \
        sudo \
        ca-certificates \
        netbase \
    && apt-get clean \
    && apt-get autoremove \
    && rm -rf /var/lib/apt/lists/*

ENV LC_ALL C.UTF-8

# Create 01_nodoc
COPY 01_nodoc /etc/dpkg/dpkg.cfg.d/01_nodoc

# Create 01_buildconfig
RUN echo 'APT::Get::Assume-Yes "true";\n\
    APT::Install-Recommends "0";\n\
    APT::Install-Suggests "0";\n\
    quiet "true";' > /etc/apt/apt.conf.d/01_buildconfig \
    && mkdir -p /usr/share/man/man1

COPY users-groups.sh /users-groups.sh
RUN ./users-groups.sh \
    && rm users-groups.sh

FROM base as add_toradex-repository-0

FROM base as add_toradex-repository-1
ARG TORADEX_SNAPSHOT
ARG USE_TORADEX_SNAPSHOT
ARG TORADEX_FEED_BASE_URL="https://feeds.toradex.com/debian"

# Enable the Toradex package feed
# (same key is used in https://gitlab.int.toradex.com/rd/torizon-core-containers/debian-cross-toolchains
# if you change the key or feed configuration, please check the other repo!)
ADD ${TORADEX_FEED_BASE_URL}/toradex-debian-repo.gpg /etc/apt/trusted.gpg.d/
RUN chmod 0644 /etc/apt/trusted.gpg.d/toradex-debian-repo.gpg \
    && if [ "${USE_TORADEX_SNAPSHOT}" = 1 ]; then \
           TORADEX_FEED_URL="${TORADEX_FEED_BASE_URL}/snapshots/${TORADEX_SNAPSHOT}"; \
       else \
           TORADEX_FEED_URL="${TORADEX_FEED_BASE_URL}"; \
       fi \
    && echo "deb ${TORADEX_FEED_URL} testing main non-free" >>/etc/apt/sources.list \
    && echo "Package: *\nPin: origin feeds.toradex.com\nPin-Priority: 900" > /etc/apt/preferences.d/toradex-feeds

FROM add_toradex-repository-${ADD_TORADEX_REPOSITORY}

RUN apt-get -y update && apt-get install -y --no-install-recommends \
    neofetch \
    && apt-get clean && apt-get autoremove && rm -rf /var/lib/apt/lists/*

COPY neofetch.conf /root/.config/neofetch/config.conf

RUN apt-get -y update && apt-get install -y --no-install-recommends \
    libdrm2

Regards,

Chris

Hi @sirhc !

I would like to share this Debian Containers for Torizon | Toradex Developer Center article. You are not using containers from Torizon. We really recommend you start from those containers.

From the article you will see that we have the weston container for use cases that need a graphical interface.

You are starting from the debian container, which is a “graphical-less” container. I also tried to install libdrm on top of this debian and I could reproduce your error:

FROM --platform=linux/arm/v7 torizon/debian:2-bullseye
 
RUN apt-get update && \
    apt-get install libdrm2

When running the docker build on this Dockerfile above, we get the error:

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:
 libdrm2 : Depends: libdrm-common (>= 2.4.104-1) but 2.4.102-1+toradex1 is to be installed
E: Unable to correct problems, you have held broken packages.
The command '/bin/sh -c apt-get update &&     apt-get install libdrm2' returned a non-zero code: 100

But, when using weston:

FROM --platform=linux/arm/v7 torizon/weston:2
 
RUN apt-get update && \
    apt-get install libdrm2
 $ docker build .
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM --platform=linux/arm/v7 torizon/weston:2
 ---> 829f5eb1882b
Step 2/2 : RUN apt-get update &&     apt-get install libdrm2
 ---> Using cache
 ---> 8f5fc26c075d
Successfully built 8f5fc26c075d

Success :slight_smile:

Best regards,

2 Likes

Hi @sirhc,

Do you have any news on the topic? Can we tag this as solved?

Best regards,