3

After upgrading from Ubuntu 20.10 to 21.04, I get the following error:

sudo dpkg --configure -a
Setting up usrmerge (24ubuntu3) ...

FATAL ERROR: Both /lib/udev/hwdb.bin and /usr/lib/udev/hwdb.bin exist.

You can try correcting the errors reported and running again /usr/lib/usrmerge/convert-usrmerge until it will complete without errors. Do not install or update other Debian packages until the program has been run successfully.

dpkg: error processing package usrmerge (--configure): installed usrmerge package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: usrmerge

I searched for posts and articles about this specific error but I can't find anything. Any ideas to solve it ?

  • See which package the files belong to with dpkg -S /lib/udev/hwdb.bin; dpkg -S /usr/lib/udev/hwdb.bin – waltinator Jun 01 '21 at 16:28
  • Of course they both exist, they are the same file since /lib and /usr/lib became the same directory. Seems like a package error. – ubfan1 Jun 01 '21 at 17:03
  • @waltinator they don't belong to any package: $ dpkg -S /lib/udev/hwdb.bin

    dpkg-query: no path found matching pattern /lib/udev/hwdb.bin

    $ dpkg -S /usr/lib/udev/hwdb.bin dpkg-query: no path found matching pattern /usr/lib/udev/hwdb.bin

    – maustruy Jun 02 '21 at 11:10
  • @ubfan1 yes it looks like some error from the scripts which are supposed to merged these directories. I found another question that may be related: https://askubuntu.com/questions/1333784/error-after-update-ubuntu-updating-from-20-10-to-hirsute-hippo-21-04 – maustruy Jun 02 '21 at 11:17
  • 1
    Thanks guys, I filled a bug report https://bugs.launchpad.net/ubuntu/+bug/1930573. I'll let you know. – maustruy Jun 02 '21 at 11:31

1 Answers1

1

hwdb.bin is a generated file. I did check it in Ubuntu 20.04, /lib/udev/hwdb.bin and /usr/lib/udev/hwdb.bin using stat same exact size and confirmed with vbindiff. They are identical copy, so no need to be merged.

A quick fix would be deleting one of them:

sudo rm /lib/udev/hwdb.bin

It is still bug that better get reported. I should look why such generated file is not put in /var.

user.dz
  • 48,105
  • 1
    Thanks @user.dz. I already reported it: https://bugs.launchpad.net/ubuntu/+source/usrmerge/+bug/1930573 – maustruy Jun 16 '21 at 07:50