Why does "tasksel" give an "aptitude failed" error?
This is a long outstanding bug.
Do
sudo apt-get update
then
sudo tasksel install lamp-server
Oh and if this ever happens when you (re)install MySQL itself make sure to remove /var/lib/mysql
.
edit: Found it on Launchpad from a report in 2007.
Nowadays you can also do
sudo apt-get install lamp-server^
The ^ is the equivalent of task select.