debcrafters-packages team mailing list archive
-
debcrafters-packages team
-
Mailing list archive
-
Message #03120
[Bug 2072532] Re: libc6(AMD64) refuses to install: "dpkg-divert: error: cannot divert directories"
yes this will happen, especially with libpng etc.
i can't fathom why this would be blamed on the affected person as in #1.
if a desktop distro ends up in an undefined state it's not the user "running an unsupported configuration" but the system wasn't doing the steps fail-safe and let down the affected person.
plus, this is a fragile set up cludges (usrmerge, dpkg-divert, and the packages that do not handle the result, AND if /usr wasn't actually a separate partition the whole thing is happening without a need, nor merit. all to cover up the magic 'usr merge' that was not neccessary in the first place if only the libc and linker were left in their right places, the whole move being only to cover up that fstab mount orders were no longer working and thus things could break depending on the init system.
that chain of events is bad enough and at least we should supportive of people who innocently are left holding the various pieces.
one of the other main culprits is the fact that libc6 and glibc are protected packages, but that isn't restricted to libc6:amd64 and glibc:amd64. so if you had a 32bit env installed for development then this will be unfixable, save using dpkg to manually fix your libc/glibc versions back down to jammy and then you can fix anything else. if you had ksplice in use, you even need to remove the hooks since ubuntu will not uninstall it without removing it from the initrd of kernels that are listed for uninstall in the same session.
so really, given the state of affairs, i'd say a phrasing like "oh, sorry, it seems your system ended up in an unsupported configuration due to some issue. check if maybe the usr merge is still unfinished because that can cause dpkg-divert to not function as intended. in that case, you can have a broken upgrade process because noone managed to encapsulate the two problems and the combination really can't be solved without multiple repair steps by the user. it's a complex error and that's why it's not automatically stopping the upgrade without harm."
--
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/2072532
Title:
libc6(AMD64) refuses to install: "dpkg-divert: error: cannot divert
directories"
Status in glibc package in Ubuntu:
Invalid
Bug description:
I'm trying to upgrade a test partition from Linux Mint 21.x to Mint
22. Unfortunately, I can't because libc6:amd64 refuses to install. I
get the following errors:
dpkg-divert: error: cannot divert directories
Use --help for help about diverting files.
dpkg: error processing archive libc6_2.39-0ubuntu8.2_amd64.deb (--install):
new libc6:amd64 package pre-installation script subprocess returned error exit status 2
Processing triggers for libc-bin (2.35-0ubuntu3.8) ...
Errors were encountered while processing:
libc6_2.39-0ubuntu8.2_amd64.deb
Because libc6 refuses to install, other packages, such as libc-bin, refuse to install as well. I've had to change my apt sources file back to "Jammy" for the Ubuntu repos, and "Virginia" for the Mint repos, so that I can downgrade eveything back to the way it was. Also, even though this is a Linux Mint bug, I'm filing it here because the package came from Ubuntu's repos, and therefore likely affect Ubuntu as well.
After digging through the package file, I've determined the problem is
likely caused by lines 463-465 in the "preinst" file for
preinstallation. For convenience, I will copy those lines below:
if [ "$1" = install -o "$1" = upgrade ] && [ "/lib64" != "/lib" ]; then
dpkg-divert --quiet --add --no-rename --package base-files --divert "/lib64.usr-is-merged" "/lib64"
fi
I don't know anything about this dpkg-divert tool, but I guess it's
supposed to move files from the "/lib64" directory, to the
"/lib64.usr-is-merged" directory. The former does exist as a
directory, but the latter doesn't exist at all. Strange.
Also note: the package's exact name, as it appears to apt, is
"libc6_2.39-0ubuntu8.2_amd64.deb". However, LaunchPad won't let me put
that in as the package behind the but, so I guess "glibc" is close
enough.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/2072532/+subscriptions