The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.31-13+deb11u4) but 2.31-13+deb11u5 is to be installed
E: Unable to correct problems, you have held broken packages.
docker run --platform linux/amd64 -it debian:bullseye
echo 'deb http://deb.debian.org/debian bullseye main' > /etc/apt/sources.list apt-get clean
apt-get update
apt-get install libc6-dev
$ cat /etc/apt/sources.list
deb http://deb.debian.org/debian bullseye main
deb http://deb.debian.org/debian-security bullseye-security main
deb http://deb.debian.org/debian bullseye-updates main
$ cat /etc/apt/sources.list
deb http://deb.debian.org/debian bullseye main
The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.31-13+deb11u4) but 2.31-13+deb11u5 is to be installed
E: Unable to correct problems, you have held broken packages.
Step to reproduce:
docker run --platform linux/amd64 -it debian:bullseye
echo 'deb http://deb.debian.org/debian bullseye main' > /etc/apt/sources.list
If you used debootstrap or mmdebstrap to create your own chroot or
container that only includes bullseye, and not bullseye-security or bullseye-updates, then you would get libc6 (= 2.31-13+deb11u4) in
the chroot/container, and libc6-dev (= 2.31-13+deb11u4) would install successfully.
However, because you're using a container image that has been made
by someone else, what you do with that container afterwards needs to
be consistent with the assumptions they made when they created the
image.
The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.31-13+deb11u4) but 2.31-13+deb11u5
is to be installed
E: Unable to correct problems, you have held broken packages.
That means you can't assume that an apt source for plain bullseye
is sufficient to get a full set of matching packages.
Hi,
Thank you for your answer.
If you used debootstrap or mmdebstrap to create your own chroot or container that only includes bullseye, and not bullseye-security or bullseye-updates, then you would get libc6 (= 2.31-13+deb11u4) in
the chroot/container, and libc6-dev (= 2.31-13+deb11u4) would install successfully.
However, because you're using a container image that has been made
by someone else, what you do with that container afterwards needs to
be consistent with the assumptions they made when they created the
image.
The Docker example was meant so that the problem could be reproduced
quickly. I can see the same problem with the official image debian-11.5.0-amd64-netinst.iso. Sorry for the confusion.
Step to reproduce:
1. Install Debian with debian-11.5.0-amd64-netinst.iso
2. echo 'deb http://deb.debian.org/debian bullseye main' > /etc/apt/sources.list
3. apt-get clean
4. apt-get update
5. apt-get install libc6-dev
Then I get the same message:
The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.31-13+deb11u4) but 2.31-13+deb11u5
is to be installed
E: Unable to correct problems, you have held broken packages.
You write:
That means you can't assume that an apt source for plain bullseye
is sufficient to get a full set of matching packages.
Perhaps this is also the case for debian-11.5.0-amd64-netinst.iso. I was
not sure at that point. Maybe that was a wrong assumption I made.
Best,
Markus
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 33:47:34 |
Calls: | 6,707 |
Files: | 12,239 |
Messages: | 5,353,263 |