在Ubuntu上安装旧的PHP版本 [英] Install old PHP version on Ubuntu

查看:530
本文介绍了在Ubuntu上安装旧的PHP版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Ubuntu14.04PHP 5.5.9.
现在我需要PHP 5.4.*

I have got an Ubuntu14.04 and a PHP 5.5.9 installed.
Now I need PHP 5.4.*

如我所见,无法将其降级.
我必须清除它,然后安装旧版本.

As I have seen, it is not possible to downgrade it.
I have to purge it and then install the old version.

我到处搜索过,但是找不到如何获得旧版PHP的说明.

I have searched everywhere but I can't find an instruction how to get an old PHP version which works.

我已经尝试使用apt-get install php5=version来获取它,但是apt-cache policy php5始终只显示PHP 5.5.9
还有
wget php5.4....
./configure
制作
进行安装
不起作用.

I already tried to get it with apt-get install php5=version, but apt-cache policy php5 does always only show PHP 5.5.9
And also
wget php5.4....
./configure
make
make install
doesn't work.

我的问题有什么解决方案?

What is the solution for my problem?

推荐答案

从源代码下载Apache http和PHP即可完成.

Download Apache http and PHP from source and it can be done.

选择安装源位置;我个人使用/usr/local/src,但我已经看到许多替代方法.

Choose an installation source location; personally I use /usr/local/src but I've seen many alternatives.

下载适当版本的Apache HTTP(可能是2.4,我使用tar.gz文件) http://httpd.apache.org/download.cgi

Download Apache HTTP of the appropriate version (probably 2.4, I use the tar.gz files) http://httpd.apache.org/download.cgi

下载您的PHP http://php.net/get/php-5.4.42.tar.gz/from/a/mirror

您将需要解压缩(tar -zxvf),进行配置,进行安装以及同时安装httpd和php.两者都需要考虑大量的配置选项.您可能会遇到很多障碍,并且需要使用apt-get安装各种软件包,但不要绝望-搜索错误,您会找到帮助,

You will need to unzip (tar -zxvf), configure, make, make install both httpd and php. There are tons of configuration options you'll need to consider with both. You may hit many obstacles along the way and need to install various packages with apt-get but don't despair - search for the errors and you will find help, for example

在开始安装之前,请确保已完全删除php5.5的所有残余内容

Before you begin installing, make sure you've completely removed all remnants of php5.5

祝你好运,并发表你的结果.

Good luck and post your results.

这篇关于在Ubuntu上安装旧的PHP版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆