Today, when setting up my debian server, I get this error
[chef]:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libgtk2.0-0
Suggested packages:
librsvg2-common gvfs
The following NEW packages will be installed:
libgtk2.0-0
0 upgraded, 1 newly installed, 0 to remove and 235 not upgraded.
90 not fully installed or removed.
Need to get 0 B/2,224 kB of archives.
After this operation, 6,230 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
(Reading database ... 37319 files and directories currently installed.)
Unpacking libgtk2.0-0 (from .../libgtk2.0-0_2.24.18-1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libgtk2.0-0_2.24.18-1_amd64.deb (--unpack):
triggers ci file contains unknown directive `interest-noawait'
configured to not write apport reports
Errors were encountered while processing:
/var/cache/apt/archives/libgtk2.0-0_2.24.18-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
This error happened because of failure install of some packages. It make we cannot use apt-get to install any packages.
To solve it, firstly we need to find which packages are fail to install
[chef]:-$ sudo dpkg --configure -a
Setting up libpth20 (2.0.7-16) ...
Setting up libxdmcp6 (1:1.1.1-1) ...
Setting up libdbus-1-3 (1.6.12-1) ...
Setting up libjs-jquery (1.7.2+dfsg-2) ...
Setting up libtasn1-3 (2.14-3) ...
Setting up python-zope.interface (4.0.5-1) ...
Setting up libgraphite2-3 (1.2.3-1) ...
Setting up libgpg-error0 (1.10-3.1) ...
Setting up hicolor-icon-theme (0.12-1) ...
Setting up libglib2.0-data (2.36.1-2build1) ...
Setting up libgssglue1 (0.4-2) ...
Installing new version of config file /etc/gssapi_mech.conf ...
Setting up python-configobj (4.7.2+ds-5) ...
Setting up libthai-data (0.1.19-2) ...
Setting up python-lazr.uri (1.0.3-1) ...
Setting up fonts-dejavu-core (2.33+svn2514-3) ...
Setting up python-keyring (0.9.3-1) ...
Setting up libjbig0 (2.0-2) ...
Setting up krb5-locales (1.10.1+dfsg-6.1) ...
dpkg: dependency problems prevent configuration of pinentry-gtk2:
pinentry-gtk2 depends on libgtk2.0-0 (>= 2.10.0); however:
Package libgtk2.0-0 is not installed.
dpkg: error processing pinentry-gtk2 (--configure):
dependency problems - leaving unconfigured
Setting up libgtk2.0-common (2.24.18-1) ...
Setting up libtiff4 (3.9.7-1) ...
Setting up libsystemd-login0 (44-12) ...
Setting up libassuan0 (2.1.0-1) ...
Setting up libkrb5support0 (1.10.1+dfsg-6.1) ...
Setting up python-bzrlib (2.6.0~bzr6574-1) ...
Setting up libgdk-pixbuf2.0-common (2.28.2-1) ...
Setting up libksba8 (1.3.0-2) ...
Setting up libdatrie1 (0.2.6-2) ...
Setting up libavahi-common-data (0.6.31-2) ...
Setting up libjasper1 (1.900.1-14) ...
Setting up libavahi-common3 (0.6.31-2) ...
Setting up python-simplejson (2.6.2-1) ...
Setting up python-crypto (2.6-5) ...
Setting up ttf-dejavu-core (2.33+svn2514-3) ...
Setting up python-wadllib (1.3.2-2) ...
Setting up libavahi-client3 (0.6.31-2) ...
Setting up fontconfig-config (2.10.2-2) ...
Setting up python-oauth (1.0.1-3) ...
Setting up libp11-kit0 (0.18.3-2) ...
dpkg: dependency problems prevent configuration of libgtk2.0-bin:
libgtk2.0-bin depends on libgtk2.0-0 (= 2.24.18-1); however:
Package libgtk2.0-0 is not installed.
dpkg: error processing libgtk2.0-bin (--configure):
dependency problems - leaving unconfigured
Setting up libatk1.0-data (2.8.0-2) ...
Setting up libx11-data (2:1.6.0-1) ...
Setting up python-httplib2 (0.7.4-2) ...
Setting up libpixman-1-0 (0.26.0-4) ...
dpkg: dependency problems prevent configuration of gnupg-agent:
gnupg-agent depends on pinentry-gtk2 | pinentry-curses | pinentry; however:
Package pinentry-gtk2 is not configured yet.
Package pinentry-curses is not installed.
Package pinentry is not installed.
Package pinentry-gtk2 which provides pinentry is not configured yet.
dpkg: error processing gnupg-agent (--configure):
dependency problems - leaving unconfigured
Setting up python-lazr.restfulclient (0.13.3-1) ...
Setting up libglib2.0-0 (2.36.1-2build1) ...
No schema files found: doing nothing.
Setting up python-launchpadlib (1.9.12-2) ...
Setting up libxau6 (1:1.0.8-1) ...
Setting up wwwconfig-common (0.2.2) ...
Setting up shared-mime-info (1.0-1+b1) ...
Warning: program compiled against libxml 208 using older 207
Setting up libk5crypto3 (1.10.1+dfsg-6.1) ...
Setting up bzr (2.6.0~bzr6574-1) ...
Setting up libfontconfig1 (2.10.2-2) ...
Setting up dbus (1.6.12-1) ...
Starting system message bus: dbus.
Setting up libthai0 (0.1.19-2) ...
Setting up javascript-common (7) ...
Setting up libxcb1 (1.9.1-3) ...
dpkg: dependency problems prevent configuration of gnupg2:
gnupg2 depends on gnupg-agent (= 2.0.20-1); however:
Package gnupg-agent is not configured yet.
dpkg: error processing gnupg2 (--configure):
dependency problems - leaving unconfigured
Setting up libxcb-render0 (1.9.1-3) ...
Setting up libharfbuzz0a (0.9.18-3) ...
Setting up python-paramiko (1.7.7.1-3.1) ...
Setting up libx11-6 (2:1.6.0-1) ...
Setting up libatk1.0-0 (2.8.0-2) ...
Setting up libgnutls26 (2.12.23-5) ...
Setting up libkrb5-3 (1.10.1+dfsg-6.1) ...
Setting up libxcb-shm0 (1.9.1-3) ...
Setting up fontconfig (2.10.2-2) ...
Regenerating fonts cache... done.
Setting up libgssapi-krb5-2 (1.10.1+dfsg-6.1) ...
Setting up libgdk-pixbuf2.0-0 (2.28.2-1) ...
Setting up libxext6 (2:1.3.1-2+deb7u1) ...
Setting up libxrender1 (1:0.9.7-1+deb7u1) ...
Setting up libpango-1.0-0 (1.32.5-5+b1) ...
Setting up libxrandr2 (2:1.3.2-2+deb7u1) ...
Setting up libxcomposite1 (1:0.4.4-1) ...
dpkg: dependency problems prevent configuration of libgpgme11:
libgpgme11 depends on gnupg2 (>> 2.0.4); however:
Package gnupg2 is not configured yet.
dpkg: error processing libgpgme11 (--configure):
dependency problems - leaving unconfigured
Setting up libcups2 (1.5.3-5) ...
dpkg: dependency problems prevent configuration of python-gpgme:
python-gpgme depends on libgpgme11 (>= 1.2.0); however:
Package libgpgme11 is not configured yet.
dpkg: error processing python-gpgme (--configure):
dependency problems - leaving unconfigured
Setting up libxi6 (2:1.6.1-1+deb7u1) ...
Setting up libxfixes3 (1:5.0-4+deb7u1) ...
Setting up libxdamage1 (1:1.1.4-1) ...
Setting up libxft2 (2.3.1-1) ...
Setting up libpangoft2-1.0-0 (1.32.5-5+b1) ...
Setting up libpangox-1.0-0 (0.0.2-4) ...
Setting up libxcursor1 (1:1.1.14-1) ...
Setting up libcairo2 (1.12.14-4) ...
Setting up libxinerama1 (2:1.1.2-1+deb7u1) ...
Setting up libpangocairo-1.0-0 (1.32.5-5+b1) ...
Setting up libpangoxft-1.0-0 (1.32.5-5+b1) ...
Setting up libpango1.0-0 (1.32.5-5+b1) ...
Errors were encountered while processing:
pinentry-gtk2
libgtk2.0-bin
gnupg-agent
gnupg2
libgpgme11
python-gpgme
All failed packaged was list in end of result. Now, we can just remove it
[chef]:-$ sudo apt-get remove --purge pinentry-gtk2 libgtk2.0-bin gnupg-agent gnupg2 libgpgme11 python-gpgme
Problem solved!!!