How to Install an older version of php using apt-get?

后端 未结 2 419
悲哀的现实
悲哀的现实 2021-01-14 12:11

I have this older package in this exact version that I want to install on Ubuntu.

https://launchpad.net/ubuntu/+source/php5/5.3.10-1ubuntu3.20
2条回答
  •  萌比男神i
    2021-01-14 12:24

    to find out what different versions of a package is available in the enabled repository

    apt-cache policy 
    

    in your case

    apt-cache policy php5
    

    select the version that you want to install and then type

    sudo apt-get install pkgname=version
    

    in your case

    sudo apt-get install php5=5.3.10-1ubuntu3.20
    

    before running any of the above commands, it is better to update the apt-cache first. To do it, run

    sudo apt-get update
    

提交回复
热议问题