Install older version of PHP with apt-get

5,203

Solution 1

No, you wont be able to do that with apt-get. The problem is not apt, but the fact that only version 5.3.10 is packaged for Ubuntu 12.04.

Also, make sure any pre-compiled software you wish to install matches your kernel version.

Solution 2

In synaptic, search for php, highlight the package and in one of the menus on top, try "Force Version", see if the one you want appears.

Share:
5,203

Related videos on Youtube

DullMcGee
Author by

DullMcGee

Updated on September 18, 2022

Comments

  • DullMcGee
    DullMcGee over 1 year

    I am trying to install an older version of PHP on my system. I installed Ubuntu 12.04.3 and have tried

    sudo apt-get install php
    

    This does successfully install php 5.3.10-1ubuntu3.8, however I trying to get 5.3.6-13ubuntu3.1 installed. Can someone point me in the right direction? I have no objection to using something like synaptic, I was able to find the .deb files here at security.ubuntu.com but it seems to require a huge amount of dependencies.

    Is there a way to install the version of php I want with apt-get ?

    I am open to trying stuff, this is done on a VM and I have taken a snapshot so it can be restored back to its previous state.

  • animaletdesequia
    animaletdesequia over 10 years
    Luís is right, I've just checked and the only version in the official repos is 5.4 so the only solution involves finding a third party repository that packages older versions.