6

I can't install or remove any packages right now. Every aptitude or dpkg command fails with

dpkg: error: duplicate file trigger interest for filename
`/usr/share/icons/hicolor' and package `hicolor-icon-theme'

I tried the sed trick from dpkg: error: duplicate file trigger interest for filename `/usr/lib/gio/modules' and package `libglib2.0-0:i386', but that didn't work for me.

I'm running 12.10 with 3.2.0-32.

Edit 1:

ls -al /usr/share/icons/hicolor`
  total 92
  drwxr-xr-x 15 root root  4096 Jun 19 18:56 .
  drwxr-xr-x  3 root root  4096 Mar 24 23:11 ..
  drwxr-xr-x 15 root root  4096 Apr  1  2009 128x128
  drwxr-xr-x 15 root root  4096 Apr  1  2009 16x16
  drwxr-xr-x 15 root root  4096 Apr  1  2009 192x192
  drwxr-xr-x 15 root root  4096 Apr  1  2009 22x22
  drwxr-xr-x 15 root root  4096 Apr  1  2009 24x24
  drwxr-xr-x 15 root root  4096 May  4  2011 256x256
  drwxr-xr-x 15 root root  4096 Apr  1  2009 32x32
  drwxr-xr-x 15 root root  4096 Apr  1  2009 36x36
  drwxr-xr-x 15 root root  4096 Apr  1  2009 48x48
  drwxr-xr-x 15 root root  4096 Apr  1  2009 64x64
  drwxr-xr-x 15 root root  4096 Apr  1  2009 72x72
  drwxr-xr-x 15 root root  4096 Apr  1  2009 96x96
  -rw-r--r--  1 root root  1252 Nov  3  2012 icon-theme.cache
  -rw-r--r--  1 root root 24671 Mar 22  2012 index.theme
  drwxr-xr-x 15 root root  4096 Apr  1  2009 scalable

Edit 2:

$ cat /var/lib/dpkg/triggers/File
  /usr/share/icons/hicolor hicolor-icon-theme
  /usr/share/info install-info
  /usr/share/wordpress/wp-content wordpress
  /etc/init ureadahead
  /etc/init.d ureadahead
  /usr/man man-db
  /usr/share/man man-db
  /usr/local/man man-db
  /usr/local/share/man man-db
  /usr/X11R6/man man-db
  /opt/man man-db
  /etc/ufw/applications.d ufw
  /etc/lsb-release plymouth-theme-ubuntu-text
  /usr/lib/mime/packages mime-support
  /etc/sgml sgml-base
  /usr/share/package-data-downloads update-notifier-common
  /usr/share/fonts fontconfig
  /usr/share/ghostscript/fonts fontconfig
  /usr/share/texmf/fonts fontconfig
  /usr/lib/x86_64-linux-gnu/gio/modules libglib2.0-0:amd64
  /usr/lib/gio/modules libglib2.0-0:amd64
  /usr/share/glib-2.0/schemas libglib2.0-0:amd64
  /etc/php5/conf.d libapache2-mod-php5
  /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders libgdk-pixbuf2.0-0:amd64
  /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders libgdk-pixbuf2.0-0:amd64
  /usr/share/mime/packages shared-mime-info
  /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules libgtk2.0-0:amd64
  /usr/lib/gtk-2.0/2.10.0/immodules libgtk2.0-0:amd64
  /usr/share/icons/hicolor hicolor-icon-theme
5
  • Would you include a link to the contents of /var/lib/dpkg/triggers/File? (Assuming the problem is related to this file.)
    – edwin
    Jul 5, 2013 at 23:43
  • I have kind of replicated the error: a) I duplicated the hicolor line in /var/lib/dpkg/triggers/File, b) I tried installing something that might update hicolor (sudo apt-get install xpdf), and c) the package gets downloaded but when the installation starts there's the error and on the last line: E: Sub-process /usr/bin/dpkg returned an error code (2).
    – edwin
    Jul 6, 2013 at 0:06
  • edwin: question updated with the contents of the file. Jul 6, 2013 at 13:01
  • Ubuntu Software Center > Edit > Software sources... > Other software tab > Is there any line related to "hicolor-icon-theme"?
    – mini
    Jul 10, 2013 at 10:40
  • 1
    The first and last lines of /var/lib/dpkg/triggers/File are duplicates, remove one. That should fix the problem.
    – edwin
    Jul 10, 2013 at 23:12

3 Answers 3

10
+50

Notice the first and last lines of /var/lib/dpkg/triggers/File are duplicates (both contain the same about hicolor). Try removing one of the lines (leaving the other!):

sudo gedit /var/lib/dpkg/triggers/File

then save it. Then try installing/removing software again.

You might also want to run sudo apt-get clean, since apt-get might have cached the packages that failed to install.

1

You could try it with re-set the file-attributes by :

chmod 755 /usr/share/icons/hicolor && chmod 755 /usr/share/icons/hicolor/*

Then reboot your machine and check if this helped or if problems stay the same.

If problem stay the same then :

apt-get install --reinstall dpkg*

then :

dpkg --purge hicolor-icon-theme

after that install it again :

dpkg -i hicolor-icon-theme

Yes, I know, this looks trivial, but often it is only a read-write-error of installed packages resp. a matter of file-attributes.

3
  • chmod didn't help. The apt-get install --reinstall command fails with the same dpkg error. Jul 5, 2013 at 21:03
  • 1
    goto sudo gedit /var/lib/dpkg/triggers/File ":" Delete all occurrences and save the file, then run sudo apt-get update.
    – j0h
    Jul 6, 2013 at 6:04
  • j0h — that worked. Can you make a real answer so I can accept it? Jul 6, 2013 at 13:06
0

Here is presented a little solution for similiar situation (it comes from debian-list) :

http://useranswer.com/answer/dpkg-error-duplicate-file-trigger-interest-for-filename-usrlibgiomodules-and-package-libglib2-0-0i386/

Maybe this helps already ?

There this "duplicate - error" is solved by:

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

4
  • That's the exact same technique I already stated didn't work. Please click the link in my question. Jul 5, 2013 at 4:10
  • what output has ls -al /usr/share/icons/hicolor ? Jul 5, 2013 at 13:02
  • See pastebin.com/ukueCurN Jul 5, 2013 at 17:30
  • @PaulSchreiber Don't quite know, if this is a matter of file-attribute ?! try this: chmod 755 /usr/share/icons/hicolor and chmod 755 /usr/share/icons/hicolor/* ( after this reboot your machine and check if problems stay the same ) - otherwise this would then go deeper. If no success I will look at it tommorrow again. Now bed-time for me. Jul 5, 2013 at 17:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .