dpkg: error: duplicate file trigger interest for filename `/usr/lib/gtk-2.0/2.10.0/immodules' and package `libgtk2.0-0:amd64'

Bug #1017031 reported by bsfmig
76
This bug affects 17 people
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
Invalid
High
Unassigned
Quantal
Invalid
High
Unassigned

Bug Description

Reported under guide by Steve Langasek, thank you.
This bug might be related to https://bugs.launchpad.net/ubuntu/+bug/996090.
Also related: http://askubuntu.com/questions/134842/dpkg-error-duplicate-file-trigger-interest-for-filename-usr-lib-gio-modules.
Detailed output come as follows (in Chinese):
(正在读取数据库 ... 系统当前共安装有 199478 个文件和目录。)
正预备替换 libsamplerate0:amd64 0.1.8-4 (使用 .../libsamplerate0_0.1.8-5_amd64.deb) ...
正在解压缩将用于更替的包文件 libsamplerate0:amd64 ...
正预备替换 vlc-nox 2.0.1-4 (使用 .../vlc-nox_2.0.1-4build1_amd64.deb) ...
正在解压缩将用于更替的包文件 vlc-nox ...
正在处理用于 man-db 的触发器...
dpkg: error: 文件 /usr/lib/gtk-2.0/2.10.0/immodules 和软件包
libgtk2.0-0:amd64 有重复的文件触发关注
E: Sub-process /usr/bin/dpkg returned an error code (2)
软件包安装失败。正在试图恢复:
dpkg: error: 文件 /usr/lib/gtk-2.0/2.10.0/immodules 和软件包
libgtk2.0-0:amd64 有重复的文件触发关注
按回车继续。

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: dpkg 1.16.4.3ubuntu1
ProcVersionSignature: Ubuntu 3.4.0-5.11-generic 3.4.0
Uname: Linux 3.4.0-5-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.1.1-0ubuntu2
Architecture: amd64
Date: Sun Jun 24 10:31:21 2012
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110426)
ProcEnviron:
 LANGUAGE=zh_CN:zh:en_US:en
 TERM=xterm
 PATH=(custom, user)
 LANG=zh_CN.UTF-8
 SHELL=/bin/bash
SourcePackage: dpkg
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
bsfmig (bigslowfat) wrote :
Revision history for this message
bsfmig (bigslowfat) wrote :

I also packed my whole /var/lib/dpkg folder and can upload it to somewhere if needed.
Thanks!

Revision history for this message
bsfmig (bigslowfat) wrote :

Additionally, the following command might drag you out of the quagmire:

 sed -n -e"s,/,\\\\\\\\/,g; s/:$(dpkg --print-architecture)$//p " \
      /var/lib/dpkg/triggers/File \
 | while read line; do
     sudo sed -i -e"/^$line$/d" /var/lib/dpkg/triggers/File
 done

Revision history for this message
Steve Langasek (vorlon) wrote :

my theory of how this happened was that there was already a trigger in /var/lib/dpkg/triggers/File for '/usr/lib/gtk-2.0/2.10.0/immodules libgtk2.0-0' before the upgrade to quantal dpkg, then after upgrade libgtk2.0-0 was installed, resulting in the addition of a trigger for ' /usr/lib/gtk-2.0/2.10.0/immodules libgtk2.0-0:amd64'. However, the attached apt term log does not support this; it shows no upgrades of libgtk2.0-0 after dpkg is upgraded. So I don't understand how the dpkg database got into this state.

Changed in dpkg (Ubuntu):
importance: Undecided → High
Revision history for this message
GrAndSE (grandse) wrote :

I fix It for my system removing lines contains:

/usr/lib/gtk-2.0/2.10.0/immodules libgtk2.0-0:amd64

from file:

/var/lib/dpkg/triggers/File

and line:

interest /usr/lib/gtk-2.0/2.10.0/immodules

from:

/var/lib/dpkg/info/libgtk2.0-0:amd64.triggers

After that I can continue system upgrade. But I have no idea where this lines cames from and why all ok for libgtk-3-0:amd64 (it has both interest for /usr/lib/gtk-3.0/3.0.0/immodules and /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules) as for any other packages. Sorry I'm not an expert in debian packages machinery :) Hope it could help.

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

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

Changed in dpkg (Ubuntu):
status: New → Confirmed
Revision history for this message
Steve Langasek (vorlon) wrote :

There have been no further reports of this issue, and I don't have a theory for how this could have even happened in the first place. I suspect a transient issue that's been resolved since this bug was reported.

Changed in dpkg (Ubuntu Quantal):
status: Confirmed → Invalid
Revision history for this message
Ian Macs (ianmacs) wrote :

I might see another incarnation of the same bug. Upgraded to quantal yesterday. Today, I am stuck at

dpkg: error: duplicate file trigger interest for filename `/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders' and package `libgdk-pixbuf2.0-0:amd64'
E: Sub-process /usr/bin/dpkg returned an error code (2)
A package failed to install. Trying to recover:
dpkg: error: duplicate file trigger interest for filename `/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders' and package `libgdk-pixbuf2.0-0:amd64'

Upgrade went fine. Now I was just trying to reinstall science-mathematics and ubuntustudio-audio which I deinstalled because packages in them caused conflicts during upgrade.

Will try to fix my installation as outlined in previous posts.

Revision history for this message
Mark Wormgoor (markwo) wrote :

I had the same problem here when trying to upgrade from 12.04 to 12.10. This actually hit me during the upgrade process, which was kind of annoying. I manually removed the following two lines from /var/lib/dpkg/triggers/File.
/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders libgdk-pixbuf2.0-0
/usr/lib/gtk-2.0/2.10.0/immodules libgtk2.0-0

The file also had the following lines, which I left in place:
/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders libgdk-pixbuf2.0-0:amd64
/usr/lib/gtk-2.0/2.10.0/immodules libgtk2.0-0:amd64

Upgrade is now continuing - so hoping for the best. The dpkg error is gone - and the upgrade has already continued past where it stopped.

Revision history for this message
gert (gert.cuykens) wrote :

sed commando from above, fix confirmed

Revision history for this message
Rhys (rhys-rhaven) wrote :

I got the same bug during upgrade from 12.04.1 to 12.10 from full internal mirror of precise and lucid, command above fixed it.

Revision history for this message
Lixin Chin (wstfgl) wrote :

I've been seeing the same problem as #8 while trying to upgrade from 12.04 to 12.10:

dpkg: error: duplicate file trigger interest for filename `/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders' and package `libgdk-pixbuf2.0-0:amd64'

Manually removing
/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders libgdk-pixbuf2.0-0
/usr/lib/gtk-2.0/2.10.0/immodules libgtk2.0-0
from /var/lib/dpkg/triggers/File as per #9, then running 'apt-get -f install' seems to have fixed the problem.

Revision history for this message
Mark Wilkinson (mhw) wrote :

I also ran in to this problem when I tried to upgrade my system from precise to quantal. After hitting this bug and having the upgrade fail I wasn't able to fix my system easily with confidence that I'd fixed things, so I had to revert to backups. Fortunately this also means that I can definitively say that the oddities/errors in /var/lib/dpkg/triggers/File existed prior to starting the upgrade. I'll attach a copy of that file from my backup of my system as it was when running precise prior to the upgrade.

I noticed a couple of oddities in the file:
* one line says "/@OLD_MODULES_BASE_PATH@/immodules libgtk-3-0", which looks like a variable wasn't expanded properly somewhere.
* there are a number of lines that are the same other than having ":i386" on the end, which seems to be the main problem identified in this bug.

It's noticeable that all the strange lines seem to relate to gtk and co. I guess the question is what the right fix should be: it looks like these lines should be tidied up somehow, but I don't know whether that would be better done by the upgrade installer or by a fix to the gtk packages to edit the oddities out.

Revision history for this message
Matthias Schmidt (mschmidt) wrote :

hit the issue while doing an upgrade on my 12.10 amd64 using Software Updater. The package where the problem appared is xdiagnose. I used the tipps from #12 to fix the issue.

Revision history for this message
AllGamer (allgamer) wrote :

confirmed removing the two i386 reference lines fixed the issue:

/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders libgdk-pixbuf2.0-0
/usr/lib/gtk-2.0/2.10.0/immodules libgtk2.0-0

left the 2 lines referencing the AMD64 since i'm running a 64 bit CPU

/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders libgdk-pixbuf2.0-0:amd64
/usr/lib/gtk-2.0/2.10.0/immodules libgtk2.0-0:amd64

Revision history for this message
Nicolas Delvaux (malizor) wrote :

I got this same issue while upgrading from Precise to Trusty.

I had to remove the same lines as #15.

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.