I had tried your solution but with no luck.
Luckily I've found the solution to my problem, I was using Yakuake (drop-down terminal emulator) to install LAMP using tasksel install LAMP command but it seemed to be stuck at 0% and so I closed that terminal session.
After this, every time I try to run the same command in terminal (like I should have been doing in the first place) it gave out the failed (100) error.
Tried filfish's method but made no difference.
Googled about some more to find https://bugs.launchpad.net/ubuntu/+s...el/+bug/131134
. Within the posts there is one post which I will paste below:
I had the same error message after cancelling the installation process of LAMP task. The system prompted me a suggestion to run the following command (as super user):
sudo dpkg --configure -a
And that finalized the pending installation and solved the problem.
I hope that it works for you also.
The sudo dpkg --configure -a seemed to almost work but there was an error for the installation of mySQL. Tried the old tasksel command again and it worked a charm.