a "subprocess installed post-installation script returned error exit status 2" error can be solved removing the relaive package record from /var/lib/dpkg/status
Example:
If you have this error
E: fglrx-kernel-source: subprocess installed post-installation script returned error exit status 2
remove the fglrx-kernel-source rows from /var/lib/dpkg/status