View Full Version : [SOLVED] Problem removing python-gtk2-dev

August 10th, 2015, 12:35 PM
Hi everyone,
I am running Ubuntu 14..04 and I ran into this problem: trying to remove (from Synaptic) package 'python-gtk2-dev' I get this error message:

Removing python-gtk2-dev (2.24.0-3ubuntu3) ...
dpkg: error processing package python-gtk2-dev (--purge):
subprocess installed 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:
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
This doesn't allow me to do : 'apt-get autoremove' either

August 10th, 2015, 03:33 PM
with your file manager, try to search about that 'python-gtk2-dev' file, and delete the line ending with 'postinst' (if it does not resolve that issue, delete the other related entries too)
you may need to logout/in

August 10th, 2015, 04:01 PM
Tried to find with
'sudo find / -type f -name python-gtk2-dev'
Nothing was returned. Any other suggestions, please ?

August 10th, 2015, 07:09 PM
liviu1; Hello;

Maybe "reverse engineer" and see what we can find ?

ls -al /var/lib/dpkg/info/python*.list

Once the package is identified, one can open the related text file in an editor and see where the files were installed to.
Isolate the one in question and make the proper edit ?

my bit to try and help

August 11th, 2015, 09:59 AM
Problem solved as here: http://ubuntuforums.org/showthread.php?t=1336548 (http://www.google.com/url?q=http%3A%2F%2Fubuntuforums.org%2Fshowthread.p hp%3Ft%3D1336548&sa=D&sntz=1&usg=AFQjCNEUJEhHSOVCcNbmRwuqjycFP7ax2w) . Thank you everyone for inputs!;)

August 11th, 2015, 03:44 PM
liviu1; Great !

Pleased you have resolution and as well provided the solution.

Control files, control files; What is that control file doing !

As this matter is now under control;
Please mark this thread solved;
aides others seeking the solution,
helps keep the forum clean and
precludes others miss-directing efforts to aid.

we will have more fun