如何在 ubuntu 16.04 上安装 php 5.5.9

How to install php 5.5.9 on ubuntu 16.04

我尝试使用 PPA - ppa:ondrej/php 但它说

PLEASE DON'T USE PHP 5.4 OR PHP 5.5. The PHP 5.5 and later are no longer supported with security updates, therefore they are not included in this repository.

注意:我知道使用 PHP5.5+ 不是首选,但我仍然想安装。 php5.5.9 是否有任何可用的 ppa 以及所有支持的扩展?

最佳选择

正如我在评论中所述非常强烈建议您使用PHP的受支持版本。使用 PHP 的过时版本意味着容易受到各种安全漏洞的影响。升级您的应用程序以使用 PHP 5.6 可能不是很有效。

更糟糕的选择

如果您绝对必须使用 PHP 5.5(我 不推荐 ),您应该使用最新版本 (5.5.38),而不是5.5.9. 5.5.38 与 5.5.9 之间不应有任何重大变化;你只会得到一大堆错误修正和安全补丁。

由于 PHP 5.5 已经结束,您不会通过任何渠道收到任何更新,因此通过 PPA 安装与从源构建相比没有太大价值。我同意 ppa:ondrej/php 不再提供 PHP 5.5 的立场,其他 PPA 提供商可能会走同样的路。

如果您确信自己知道使用旧版 PHP 的风险并接受它们(请不要!),您可以download the source code for PHP 5.5.38 from PHP.net and then build it.

PHP 5.5.9

说真的,我求求你,不要使用这个版本的PHP。如果在 2017 年使用 PHP 5.5.38 是疯狂的(它是!),使用 PHP 5.5.9 是 完全疯狂.