dpkg fails to run after update (error: file triggers record mentions illegal package name `libgtk2.0-0' (for interest in file `/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules'): ambiguous package name 'libgtk2.0-0' with more than one installed instance)

Bug #1015329 reported by Anders Kaseorg
52
This bug affects 8 people
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
Fix Released
Critical
Adam Conrad

Bug Description

dpkg 1.16.3ubuntu1 aborts with an error if any multiarch libraries are installed which declare triggers. The error message looks like this:

dpkg: error: file triggers record mentions illegal package name `libgtk2.0-0' (for interest in file `/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules'): ambiguous package name 'libgtk2.0-0' with more than one installed instance

This makes it impossible to install any further packages with the dpkg command until the triggers file is updated for the new syntax.

To fix the triggers file, run the following command from a terminal:

arch=$(dpkg --print-architecture | tail -n1); while true; do res=$(sudo dpkg --configure -a 2>&1 | sed -n -e"s/.*file triggers record mentions illegal package name \`\([^']*\)'.*/\1/p"); if [ -z "$res" ]; then break; fi; echo Fixing trigger for package $res; sudo sed -i -e"s/$res\$/$res:$arch/" /var/lib/dpkg/triggers/File; done

This will correct the dpkg configuration and allow you to proceed with the upgrade.

dpkg 1.16.3ubuntu2 will be released later today with a fix for this issue. Users who have not yet upgraded to dpkg 1.16.3ubuntu1 in quantal are advised to wait for 1.16.3ubuntu2 before upgrading.

Original bug description below.

Here’s the log from the upgrade.

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
  db4.8-util debhelper dpkg-dev gimp-resynthesizer haskell-platform
  haskell-platform-prof libblas3gf libc-bin libc-dev-bin libc6 libc6-dbg
  libc6-dev libc6-dev-i386 libc6-i386 libdpkg-perl libghc-blaze-builder-dev
  libghc-cairo-dev libghc-cairo-prof libghc-diagrams-dev libghc-diagrams-doc
  libghc-gio-dev libghc-gio-prof libghc-glut-dev libghc-glut-prof
  libghc-hashable-dev libghc-hashable-prof libghc-http-dev libghc-http-prof
  libghc-mtl-dev libghc-mtl-prof libghc-network-dev libghc-network-prof
  libghc-parsec3-dev libghc-parsec3-prof libghc-regex-base-dev
  libghc-regex-base-prof libghc-stm-dev libghc-stm-prof libghc-syb-dev
  libghc-syb-prof libghc-text-dev libghc-text-prof libghc-transformers-dev
  libghc-transformers-prof libghc-xhtml-dev libghc-xhtml-prof libghc-xml-dev
  liblapack3gf libnm-glib-vpn1 lilypond-data nmh xz-utils
The following packages will be upgraded:
  debsums dpkg liblzma5 libsyncdaemon-1.0-1 multiarch-support
  python-ubuntuone-client ubuntuone-client
7 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.
Need to get 2,294 kB of archives.
After this operation, 44.0 kB disk space will be freed.
Do you want to continue [Y/n]?
Get:1 http://us.archive.ubuntu.com/ubuntu/ quantal/main dpkg amd64 1.16.3ubuntu1 [1,834 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ quantal/main liblzma5 amd64 5.1.1alpha+20120614-1 [89.0 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ quantal/main multiarch-support amd64 2.15-0ubuntu14 [4,476 B]
Get:4 http://us.archive.ubuntu.com/ubuntu/ quantal/universe debsums all 2.0.52 [43.7 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ quantal/main libsyncdaemon-1.0-1 amd64 3.99.0-0ubuntu1 [45.8 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ quantal/main ubuntuone-client all 3.99.0-0ubuntu1 [47.0 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu/ quantal/main python-ubuntuone-client all 3.99.0-0ubuntu1 [230 kB]
Fetched 2,294 kB in 2s (794 kB/s)
(Reading database ... 447277 files and directories currently installed.)
Preparing to replace dpkg 1.16.1.2ubuntu8 (using .../dpkg_1.16.3ubuntu1_amd64.deb) ...
Unpacking replacement dpkg ...
Processing triggers for man-db ...
dpkg: error: file triggers record mentions illegal package name `libgtk2.0-0' (for interest in file `/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules'): ambiguous package name 'libgtk2.0-0' with more than one installed instance
dpkg-query: error: file triggers record mentions illegal package name `libgtk2.0-0' (for interest in file `/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules'): ambiguous package name 'libgtk2.0-0' with more than one installed instance
debsums: dpkg-query --admindir=/var/lib/dpkg --showformat=${Package}

${PackageSpec}

${binary:Package}

${Version}

${Status}

${Conffiles}

${Replaces}

 --show failed (exit status 2)
E: Problem executing scripts DPkg::Post-Invoke 'if [ -x /usr/bin/debsums ]; then /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives; fi'
E: Sub-process returned an error code
E: Sub-process /usr/bin/dpkg returned an error code (2)

Related branches

Revision history for this message
Anders Kaseorg (andersk) wrote :

I was able to get past the dpkg error by manually editing /var/lib/dpkg/triggers/File, then running
  dpkg --add-architecture amd64
  dpkg --add-architecture i386
  apt-get -f install
but I’m not sure everything is quite right yet so I don’t yet recommend this.

Steve Langasek (vorlon)
Changed in dpkg (Ubuntu):
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Adam Conrad (adconrad)
Steve Langasek (vorlon)
summary: - dpkg: error: file triggers record mentions illegal package name
- `libgtk2.0-0' (for interest in file `/usr/lib/x86_64-linux-
- gnu/gtk-2.0/2.10.0/immodules'): ambiguous package name 'libgtk2.0-0'
- with more than one installed instance
+ dpkg fails to run after update (error: file triggers record mentions
+ illegal package name `libgtk2.0-0' (for interest in file
+ `/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules'): ambiguous package
+ name 'libgtk2.0-0' with more than one installed instance)
Revision history for this message
Anders Kaseorg (andersk) wrote :

> I was able to get past the dpkg error by manually editing /var/lib/dpkg/triggers/File,

Specifically, I had to replace libgtk2.0-0 with libgtk2.0-0:amd64 in the second column, then repeat for a few other packages as the error message changed.

> then running
> dpkg --add-architecture amd64
> dpkg --add-architecture i386
> apt-get -f install

Steve Langasek (vorlon)
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dpkg - 1.16.3ubuntu2

---------------
dpkg (1.16.3ubuntu2) quantal; urgency=low

  * lib/dpkg/pkg-spec.c: map unqualified package names of multiarch-same
    packages to the native arch instead of throwing an error, so that we
    don't break on upgrade when there are unqualified names stored in dpkg's
    own trigger database. LP: #1015329.
 -- Steve Langasek <email address hidden> Tue, 19 Jun 2012 18:08:02 -0700

Changed in dpkg (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Stephen Cradock (s-cradock) wrote :

This is confusing me - my quantal system has dpkg 1.16.4.3ubuntu1. Updating works fine, but there is no sign of the ..ubuntu2 package yet.

Are we looking at the same package? - 1.16.3 or 1.16.4.3?

Revision history for this message
Anders Kaseorg (andersk) wrote :

There’s nothing confusing about that. This bug was introduced in 1.16.3ubuntu1 and fixed in 1.16.3ubuntu2, which was then superseded by a newer version 1.16.4.3ubuntu1. (Check the changelog.)

Revision history for this message
jerrylamos (jerrylamos) wrote :

As of 25 June the bug is still in the Quantal Daily Build.

Did an
sudo apt-get update
now apt-get install is working.

Either a change since today's daily build was made today or daily build didn't do an update.

Anyway install successful up and running just before Alpha 2. Some pain with wireless WPA which is another bug #.

Jerry

Revision history for this message
zasq (zasq) wrote :

Hello,

I have the same error after upgrading from precise to quantal. Upgrade went fine, then I saw icons missing and further updating is not possible any more. I tried to update and I got the following error message (sorry, it's in German, but I think it means the same as in the above mentioned error):

dpkg: Fehler: doppeltes Dateitrigger-Interesse für Dateiname »/usr/lib/gtk-2.0/2.10.0/immodules« und Paket »libgtk2.0-0:amd64«
E: Sub-process /usr/bin/dpkg returned an error code (2)

dpkg version is 1.16.7ubuntu6

Please let me know, if I have to file a new bug. Thank you!

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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