Every apt-get operations gives me the following error message:
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
dpkg: error processing archive /var/cache/apt/archives/python-gtk2-dev_2.24.0-3ubuntu4_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/python-gtk2-dev_2.24.0-3ubuntu4_all.deb
I tried to remove the package in various ways described here: How to remove/install a package that is not fully installed?
Unfortunately I get the following error:
sudo dpkg -P python-gtk2-dev
dpkg: error processing package python-gtk2-dev (--purge):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
Errors were encountered while processing:
python-gtk2-dev
sudo apt-get install --reinstall python-gtk2-dev
also doesn't work