dpkg: error while cleaning up:
unable to restore backup version of `/usr/src/linux-headers-2.6.35-23-generic/arch/x86/kernel/.asm-offsets.s.cmd': Read-only file system
...
touch: cannot touch `/var/lib/update-notifier/dpkg-run-stamp': Read-only file system
sh: cannot create /var/lib/update-notifier/updates-available: Read-only file system
E: Problem executing scripts DPkg::Post-Invoke 'if [ -d /var/lib/update-notifier ]; then touch /var/lib/update-notifier/dpkg-run-stamp; fi; if [ -e /var/lib/update-notifier/updates-available ]; then echo > /var/lib/update-notifier/updates-available; fi '
E: Sub-process returned an error code
E: Sub-process /usr/bin/dpkg returned an error code (2)
I did what apt-get suggests:
first:
sudo apt-get update
sudo dpkg --configure -a
sudo apt-get install -f (this fails):
dpkg: error while cleaning up: linux-headers- 2.6.35- 23-generic/ arch/x86/ kernel/ .asm-offsets. s.cmd': Read-only file system update- notifier/ dpkg-run- stamp': Read-only file system update- notifier/ updates- available: Read-only file system update- notifier ]; then touch /var/lib/ update- notifier/ dpkg-run- stamp; fi; if [ -e /var/lib/ update- notifier/ updates- available ]; then echo > /var/lib/ update- notifier/ updates- available; fi '
unable to restore backup version of `/usr/src/
...
touch: cannot touch `/var/lib/
sh: cannot create /var/lib/
E: Problem executing scripts DPkg::Post-Invoke 'if [ -d /var/lib/
E: Sub-process returned an error code
E: Sub-process /usr/bin/dpkg returned an error code (2)