This question already has an answer here:
- How do I resolve unmet dependencies? 13 answers
I've completely destroyed everything and now php wont install.
I had php5.4 and everything was great. I then needed to run Magento locally which wasnt working.
I saw one of the requirements was php5.3 so I downgraded using a script i found online but then PDO wasnt working.
I stuffed about for a few hours following what people said online, eventually nothing was working so i purged php to do a fresh install of php5.4 to start again from scratch and figure out my problems.
After i purged, i came to reinstall Php5 using apt-get install php5. Once the script ran i got the following output:
Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: php5 : Depends: libapache2-mod-php5 (>= 5.4.9-4ubuntu2.4) but 5.3.10-1ubuntu3 is to be installed or libapache2-mod-php5filter (>= 5.4.9-4ubuntu2.4) but it is not going to be installed or php5-cgi (>= 5.4.9-4ubuntu2.4) but it is not going to be installed or php5-fpm (>= 5.4.9-4ubuntu2.4) but it is not going to be installed Depends: php5-common (>= 5.4.9-4ubuntu2.4) but 5.3.10-1ubuntu3 is to be installed E: Unable to correct problems, you have held broken packages.
I then googled for ages and ran commands like clean, update, upgrade, -f install and a few others. I come back to install php and i get the same error.
How can I reinstall Php so it works again.