while upgrading apt from within aptitude, i got this error:
[...]
Setting up libapt-pkg5.0:amd64 (1.8.4) ...
(Reading database ... 316101 files and directories currently installed.)
Preparing to unpack .../libapt-inst2.0_1.8.4_amd64.deb ...
Unpacking libapt-inst2.0:amd64 (1.8.4) over (1.8.3) ...
Preparing to unpack .../archives/apt_1.8.4_amd64.deb ...
Unpacking apt (1.8.4) over (1.8.3) ...
dpkg: error: dpkg frontend lock is locked by another process
/etc/cron.daily/apt-compat.dpkg-new
/etc/kernel/postinst.d/apt-auto-removal.dpkg-new
/etc/apt/apt.conf.d/01autoremove.dpkg-new
/etc/logrotate.d/apt.dpkg-new
/etc/ld.so.conf.d/zz_i386-biarch-compat.conf.dpkg-new
E: Sub-process /usr/bin/dpkg returned an error code (2)
dpkg: error: dpkg frontend lock is locked by another process
Press Return to continue, 'q' followed by Return to quit.
however, immediately trying again (apparently) resolved the issue:
Preconfiguring packages ...
Setting up apt (1.8.4) ...
(Reading database ... 316101 files and directories currently installed.)
Preparing to unpack .../apt-utils_1.8.4_amd64.deb ...
[...]