The Advanced Package Tool, or ‘apt’ on Debian-based systems is the mainstay for installing, upgrading and removing packages.  Behind the various apt tools, the Debian package manager, dpkg, carries out the heavy lifting.  You might wish to install new versions of packages periodically with the sequence:

  1. apt-get update
  2. apt-get upgrade

Recently, this and any other upgrade failed on Debian Lenny with:

E: Sub-process /usr/bin/dpkg returned an error code (100)

A quick look at /usr/bin/dpkg revealed the following!

---------- 1 root root 365324 2010-03-08 15:35 dpkg

A quick ‘chmod 755 /usr/bin/dpkg’ fixed the problem!  I know I did not change the permissions, so it must have been a recent patch.  Hopefully this gets fixed quickly!