[Bug 2072532] Re: libc6(AMD64) refuses to install: "dpkg-divert: error: cannot divert directories"
Benjamin Börngen-Schmidt
2072532 at bugs.launchpad.net
Wed Jul 31 18:31:23 UTC 2024
I came accross the same issue when upgrading Ubuntu Jammy to Noble using
do-release-upgrade -d
In https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/2058648 it was
stated that the package usrmerge was not installed, but running apt-get
install usrmerge stated:
# apt-get install usrmerge
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package usrmerge is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'usrmerge' has no installation candidate
Easiest solution for me was
1. download usrmerge from https://packages.ubuntu.com/jammy/usrmerge
2. install using dpkg -i
3. run apt-get install -f
This installed the remaining packages just fine.
--
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