If you encountered configuration error when installing a package in Ubuntu,you will get this error message every time when you installing an other package.It’s very annoying and there is a command to delete this mis-configured package.
Run this in terminal(Applications/Accessories/Terminal):

sudo aptitude purge $(dpkg -l|grep ^rc|awk '{ print $2 }')

this will delete all packages the mis-configured or install failed in ubuntu.