Ubuntu – Dpkg: error: duplicate file trigger interest for filename `/usr/lib/gio/modules’ and package `libglib2.0-0:i386′

dpkg

I had very similar issue which was described in this question –
Why this dpkg error: ambiguous package name 'libglib2.0-0' …?. It didn't give me solution, but I have modified /var/lib/dpkg/status and I have removed duplication of ligbglib2-0-0 or something like it. I've started to get a new error, which is almost exactly the same, but I can't see anything that's duplicated in /var/lib/dpkg/status now. Any ideas?

Best Answer

From a post I read on http://lists.debian.org/debian-dpkg/2012/06/msg00071.html I could solve my problem by running:

 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