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

心不动则不痛 提交于 2020-06-23 04:02:46

问题


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

How can I install it using apt-get ? Thank you


回答1:


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

apt-cache policy <package-name>

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


来源:https://stackoverflow.com/questions/40801460/how-to-install-an-older-version-of-php-using-apt-get

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!