dpkg error: subprocess installed post-removal script returned error exit status 2

When trying to uninstall nvidia-installer-cleanup, the error info show up:

dpkg: error processing glx-diversions (--remove):
subprocess installed post-removal script returned error exit status 2
configured to not write apport reports
Errors were encountered while processing:
glx-diversions
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:

The solution to this is:

mv /var/lib/dpkg/info /var/lib/dpkg/info.110821 && mkdir /var/lib/dpkg/info && aptitude install -f

Answer yes to the questions till the process finished, then no abnormal msg with dpkg or aptitude any more.

English

Comments

THANK YOU SO FUCKING MUCH!!!!!!!!!

Add new comment