usrmerge breaks update from 20.04 to 22.04 - FATAL ERROR: Both /bin/egrep and /usr/bin/egrep exist.

Bug #1969861 reported by HugoHirsch
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
usrmerge (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

A system update from 20.04 to 22.04 stopped in the middle with the following error:

$ sudo apt -f install
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  cryptsetup-run dh-elpa-helper elpa-dash elpa-ghub elpa-git-commit elpa-let-alist elpa-magit elpa-magit-popup elpa-magit-section elpa-transient elpa-treepy elpa-with-editor emacs fonts-mathjax gcc-10-base
  gir1.2-clutter-1.0 gir1.2-clutter-gst-3.0 gir1.2-cogl-1.0 gir1.2-coglpango-1.0 gir1.2-gnomebluetooth-1.0 gir1.2-gtkclutter-1.0 ippusbxd libamtk-5-0 libamtk-5-common libaom0 libappstream-glib8
  libart-2.0-2 libbasicusageenvironment1 libboost-date-time1.71.0 libboost-filesystem1.71.0 libboost-iostreams1.71.0 libboost-locale1.71.0 libboost-log1.71.0 libboost-program-options1.71.0
  libboost-regex1.71.0 libboost-thread1.71.0 libbrlapi0.7 libcamel-1.2-62 libcbor0.6 libcdio18 libclass-accessor-perl libcmis-0.5-5v5 libcodec2-0.9 libcpp-hocon0.1.7 libcroco3 libdc1394-22 libdcmtk14
  libdirectfb-1.7-7 libdns-export1109 libdvdread7 libebml4v5 libedataserver-1.2-24 libedataserverui-1.2-2 libextutils-pkgconfig-perl libfacter3.11.0 libfl2 libfluidsynth2 libfreehep-export-java
  libfreehep-graphicsio-tests-java libfreehep-swing-java libfreehep-util-java libfreehep-xml-java libgdk-pixbuf-xlib-2.0-0 libgdk-pixbuf2.0-0 libgl1-mesa-glx libglew2.1 libgloox17 libgroupsock8
  libgtkmm-2.4-1v5 libgtkspell0 libgupnp-1.2-0 libhandy-0.0-0 libhogweed5 libidn11 libigdgmm11 libilmbase24 libio-string-perl libjas-plotter-java libjaxen-java libjdom1-java libjs-mathjax libjson-c4
  libjuh-java libjurt-java libkf5crash5 libleatherman1.4.2 liblibreoffice-java liblivemedia77 libllvm12 libmatroska6v5 libmms0 libmozjs-68-0 libnb-org-openide-util-java libnb-org-openide-util-lookup-java
  libneon27-gnutls libnettle7 libntfs-3g883 libofa0 libopenexr24 liborcus-0.15-0 libotf0 libparse-debianchangelog-perl libperl5.30 libpgm-5.2-0 libphonenumber7 libplacebo7 libpodofo0.9.6 libpoppler73
  libpoppler97 libprotobuf-lite17 libprotobuf17 libpython3.8 libpython3.8-minimal libpython3.8-stdlib libqpdf26 libraw19 libre2-5 libreoffice-style-tango libridl-java libsane libsensors4-dev libsnmp35
  libsrt1 libtablelayout-java libtepl-4-0 libtracker-control-2.0-0 libtracker-miner-2.0-0 libtracker-sparql-2.0-0 libunoloader-java liburcu6 libusageenvironment3 libusrsctp1 libvpx6 libx264-155 libx265-179
  libxml-simple-perl libxmlb1 libyaml-cpp0.6 linux-image-5.4.0-105-generic linux-image-5.4.0-107-generic linux-modules-5.4.0-105-generic linux-modules-5.4.0-107-generic
  linux-modules-extra-5.4.0-107-generic lz4 perl-modules-5.30 postgresql-client-12 postgresql-doc-12 python-backports.functools-lru-cache python-bs4 python-cairo python-gobject-2 python-html5lib
  python-lxml python-numpy python-olefile python-pil python-pkg-resources python-six python-soupsieve python-webencodings python3-entrypoints python3-nose python3.8 python3.8-minimal ruby-connection-pool
  ruby-molinillo ruby-net-http-persistent ruby-sync ruby-thor ruby2.7 ruby2.7-dev ruby2.7-doc scour syslinux syslinux-common syslinux-legacy transfig ure-java
Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
1 nicht vollständig installiert oder entfernt.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
usrmerge (25ubuntu2) wird eingerichtet ...
Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge line 172.

FATAL ERROR:
Both /bin/egrep and /usr/bin/egrep 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: Fehler beim Bearbeiten des Paketes usrmerge (--configure):
 »installiertes usrmerge-Skript des Paketes post-installation«-Unterprozess gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 usrmerge
libdvd-pkg: Checking orig.tar integrity...
/usr/src/libdvd-pkg/libdvdcss_1.4.3.orig.tar.bz2: OK
libdvd-pkg: `apt-get check` failed, you may have broken packages. Aborting...
[ Rootkit Hunter version 1.4.6 ]
File updated: searched for 182 files, found 164
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: usrmerge 25ubuntu2
ProcVersionSignature: Ubuntu 5.4.0-109.123-generic 5.4.178
Uname: Linux 5.4.0-109-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Fri Apr 22 01:30:21 2022
InstallationDate: Installed on 2019-09-18 (946 days ago)
InstallationMedia: Ubuntu-Server 18.04.3 LTS "Bionic Beaver" - Release amd64 (20190805)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: usrmerge
UpgradeStatus: Upgraded to jammy on 2022-04-21 (0 days ago)

Revision history for this message
HugoHirsch (ubuntubugs-aiki-it) wrote :
Revision history for this message
HugoHirsch (ubuntubugs-aiki-it) wrote :

After diffing egrep and fgrep in /bin and /usr/bin,
spotting no difference and removing the /bin version I was able to continue my installation.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in usrmerge (Ubuntu):
status: New → Confirmed
Revision history for this message
Natasja Dymphina van der Pluijm (natasjadymphina) wrote :

Affected me also with libgcc, but my versions are actually different:

pkg: fout bij verwerken van pakket usrmerge (--configure):
 subproces van pakket usrmerge werd script post-installation geïnstalleerd gaf de foutwaarde 1 terug
Fouten gevonden tijdens verwerken van:
 usrmerge
E: Sub-process /usr/bin/dpkg returned an error code (1)
Een pakket kon niet geïnstalleerd worden. Aan het proberen om te herstellen:
Instellen van usrmerge (25ubuntu2) ...
Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge line 172.

FATAL ERROR:
Both /lib/x86_64-linux-gnu/libgcc_s.so.1 and /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 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: fout bij verwerken van pakket usrmerge (--configure):
 subproces van pakket usrmerge werd script post-installation geïnstalleerd gaf de foutwaarde 1 terug
Fouten gevonden tijdens verwerken van:
 usrmerge

With sha256sum giving:
-d7e80cc8ff050f6942d3f42c3429b6fffb3115c5487af47849cf1c6b2d1deb64 /lib/x86_64-linux-gnu/libgcc_s.so.1
- 090c81993b36907590003a92be2e587185be79e69d49f25ef8e4b1c1a873f7b0 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1

And realpath giving:

natasja@Spinoza:~$ realpath /lib/x86_64-linux-gnu/libgcc_s.so.1
/lib/x86_64-linux-gnu/libgcc_s.so.1
natasja@Spinoza:~$ realpath /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
/usr/lib/x86_64-linux-gnu/libgcc_s.so.1

Revision history for this message
frank (franknfurter) wrote :

Hello,

I also run into it after a broken release upgrade from 20.04 to 22.04 in a Rock Pi 4. The release upgrade first was broken, because my monitor screen was suddenly black/switched off/suspended and there was no way to get into the screen. With screendump I could see, that one has to push the ok button in the info box about firefox snap install, but there was no way to do this. I had not screen installed and so logged in via ssh I could not change to the screen.

So I killed the upgrade processes and run apt install --fix-broken and... lucky me, get back to 20.04.
So I tried do-release-upgrade via ssh (You normally should not do this because ob possible network error) and get the message to do a full upgrade first before running do-release-upgrade.
So I did apt update and apt upgrade using sudo and could see, that all the 22.04 packages are beeing installed.

But: The process ended with usrmerge error (german). Here is the last output
----------------------
gkbd-capplet (3.26.1-2) wird eingerichtet ...
nautilus-share (0.7.3-2ubuntu6) wird eingerichtet ...
Trigger für sgml-base (1.30) werden verarbeitet ...
docbook-xml (4.5-11) wird eingerichtet ...
Trigger für dictionaries-common (1.28.14) werden verarbeitet ...
Trigger für ufw (0.36.1-4build1) werden verarbeitet ...
Trigger für libc-bin (2.35-0ubuntu3.1) werden verarbeitet ...
Trigger für sgml-base (1.30) werden verarbeitet ...
Fehler traten auf beim Bearbeiten von:
 usrmerge
E: Sub-process /usr/bin/dpkg returned an error code (1)
-------------------------------------
I tried sudo dpkg --configure -a and the output was

usrmerge (25ubuntu2) wird eingerichtet ...
Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge line 172.

FATAL ERROR:
Both /lib/systemd/system/serial-getty@.service and /usr/lib/systemd/system/serial-getty@.service 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: Fehler beim Bearbeiten des Paketes usrmerge (--configure):
 »installiertes usrmerge-Skript des Paketes post-installation«-Unterprozess gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 usrmerge
-------------------------------------

Do not know how to fix. Any idea how to fix?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.