Sunday, May 5, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 4447  / 2 Years ago, mon, november 7, 2022, 1:54:40

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.


More From » installation

 Answers
5

Try this command,



sudo aptitude install php5


It will install php5 along with it's dependencies.


[#27562] Monday, November 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
feeous

Total Points: 102
Total Questions: 122
Total Answers: 119

Location: Netherlands
Member since Thu, Jul 1, 2021
3 Years ago
feeous questions
Sat, Jul 23, 22, 23:21, 2 Years ago
Mon, Jul 5, 21, 19:59, 3 Years ago
Mon, Aug 16, 21, 11:42, 3 Years ago
Sun, Mar 19, 23, 21:03, 1 Year ago
;