I had that problem too, I don't know what exactly I did to fix it so I'll just put it all here.
First to become a root, and also so I did not need to enter my password with each line I ran:
sudo -i
Then I removed the lamp packages with:
dpkg --configure -a
apt-get --purge remove apache2
I had that problem too, I don't know what exactly I did to fix it so I'll just put it all here.
First to become a root, and also so I did not need to enter my password with each line I ran:
sudo -i
Then I removed the lamp packages with:
dpkg --configure -a
apt-get --purge remove apache2