[Bug 2072532] Re: libc6(AMD64) refuses to install: "dpkg-divert: error: cannot divert directories"
Julian Andres Klode
2072532 at bugs.launchpad.net
Tue Jul 9 08:41:52 UTC 2024
You seem to be running an unsupported system that has not been usr-
merged, /lib, /lib64, etc should already be a symlink to /usr/lib,
/usr/lib64, etc. To convert to a supported file system layout, install
the usrmerge package.
** Changed in: glibc (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, 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
More information about the foundations-bugs
mailing list