Ubuntu – Why does “tasksel” give an “aptitude failed” error

aptaptitudetasksel

The problem started in the following way. I was using tasksel from the terminal menu that it shows when I simply do sudo tasksel. I select Lamp Server from the list and started to install all packages related to it. The problem is that by mistake my friend clicked on the termina close button and then on accept, closing the terminal and the activity tasksel was doing. I tried to install the lamp server again and found the following problem:

sudo tasksel install lamp-server  
tasksel: aptitude failed (100)

I should mention that I already have aptitude installed. So the error is not that I am missing aptitude. It worked before closing the terminal. How can I solve this?

Best Answer

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.