php 5.5.9安装,如何在ubuntu 16.04上安装php 5.5.9 [关闭](How to install php 5.5.9 on ubuntu 16.04 [closed])...

如何在ubuntu 16.04上安装php 5.5.9 [关闭](How to install php 5.5.9 on ubuntu 16.04 [closed])

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

请不要使用PHP 5.4或PHP 5.5。 安全更新不再支持PHP 5.5及更高版本,因此它们不包含在此存储库中。

注意:据我所知,我不想使用PHP5.5 +。 是否有任何ppa可用于php5.5.9所有支持的扩展?

I tried with a PPA - ppa:ondrej/php but it says

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.

Note: I understand it is not preferred to use PHP5.5+ still i wanted to install. Is there is any ppa is available with php5.5.9 with all supported extensions?

原文:https://stackoverflow.com/questions/45389949

更新时间:2020-01-04 18:59

最满意答案

最好的选择

正如我在评论中所说, 我非常强烈建议您使用受支持的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采取的立场ppa:ondrej/php不再提供PHP 5.5,而其他PPA提供商可能会走同样的道路。

如果你确信你知道使用古老版本的PHP的风险,并接受它们( 请不要! ),你可以从PHP.net 下载 PHP 5.5.38的源代码,然后构建它 。

PHP 5.5.9

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

Best option

As I stated in comments I very strongly advise you to use a supported version of PHP. Using outdated versions of PHP means being susceptible to all kinds of security vulnerabilities. Upgrading your application to work with PHP 5.6 may not be very much work.

Much, much worse option

If you absolutely must use PHP 5.5 (which I don't recommend), you should use the latest release (5.5.38), not 5.5.9. There should not be any breaking changes in 5.5.38 vs. 5.5.9; you'll just get a whole bunch of bugfixes and security patches.

Since PHP 5.5 has reached end-of-life you won't receive any updates to it via any channel, so there isn't much value in installing via PPA vs. building from source. I agree with the stance taken by ppa:ondrej/php not to provide PHP 5.5 anymore, and other PPA providers are likely to go down the same path.

If you're confident that you know the risks of using an ancient version of PHP, and accept them (please don't!), you can download the source code for PHP 5.5.38 from PHP.net and then build it.

PHP 5.5.9

Seriously, I beg you, don't use this version of PHP. If using PHP 5.5.38 in 2017 is crazy (it is!), using PHP 5.5.9 is complete insanity.

2017-07-29

相关问答

进入php源程序目录中的ext目录中,这里存放着各个扩展模块的源代码,选择你需要的模块,比如curl模块:cd curl执行phpize生成编译文件! phpize在PHP安装目录的bin目录/usr/local/php5/bin/phpize运行时, 可能会报错:Cannot find autoconf. Please check your autoconf installation andthe $PHP_AUTOCONFenvironment variable is set correctl

...

在Ubuntu 16.04中,默认的PHP版本是7.0,如果你想使用不同的版本,那么你需要根据PHP版本安装PHP包: PHP 7.0: sudo apt-get install php-curl PHP 5.6: sudo apt-get install php5.6-curl PHP 5.5: sudo apt-get install php5.5-curl In Ubuntu 16.04 default PHP version is 7.0, if you want to use diffe

...

Ubuntu 16.04以PHP7为标准,所以没有PHP5包 但是,如果您喜欢,可以添加PPA来获取这些包: 删除所有的股票php包 列出使用dpkg -l | grep php| awk '{print $2}' |tr "\n" " "安装的php包 dpkg -l | grep php| awk '{print $2}' |tr "\n" " " dpkg -l | grep php| awk '{print $2}' |tr "\n" " "然后用sudo aptitude purge y

...

只需使用apt-get安装php5.6即可。 我从这里得到了我的指示。 一定要使用ondreij的ppa存储库。 这样php7.0和php5.6并排安装为完全独立的包。 我正在安装16.04。 我安装了php7.0和所有需要的扩展。 今天我安装了php5.6并制作了别名来在两个版本之间来回切换。 把它放在〜/ .bash_aliases中并重新加载它。 alias enablephp5.6="sudo ln -s -f /usr/bin/php5.6 /etc/alternatives/php"

...

试试php5.6-gmp : sudo apt install php5.6-gmp

显然这只会为PHP5.6安装gmp扩展。 如果您希望它为7.0,请使用正确的包名称: sudo apt install php7.0-gmp

Try php5.6-gmp: sudo apt install php5.6-gmp

Obvously this will only install gmp extension for PHP5.6. If you want it to 7.0, use the r

...

最好的选择 正如我在评论中所说, 我非常强烈建议您使用受支持的PHP版本 。 使用过时的PHP版本意味着容易受到各种安全漏洞的影响。 升级您的应用程序以使用PHP 5.6可能不是很多工作。 更糟糕的选择 如果你绝对必须使用PHP 5.5(我不推荐 ),你应该使用最新版本( 5.5.38 ),而不是5.5.9。 5.5.38与5.5.9不应有任何重大变化; 你只需要获得一大堆错误修正和安全补丁。 由于PHP 5.5已经达到使用寿命,因此您不会通过任何渠道收到任何更新,因此通过PPA安装和从源代码构建

...

您应该更改您的软件包存储库(例如在Debian / Ubuntu Aptitude存储库中),对于PHP5版本,然后安装该版本或YAML。 您还可以使用Composer进行依赖项管理,或者“最难”的方式,下载源代码并自行实现。 echo "deb http://packages.dotdeb.org wheezy-php56 all" >> /etc/apt/sources.list.d/dotdeb.list

echo "deb-src http://packages.dotdeb.org wh

...

sudo apt-get install -y php5.6-dev做到了这一点 sudo apt-get install -y php5.6-dev did the trick

显示的版本可能是好的版本,如果你只是想要版本,你也可以用php -i或php -v获取更多信息。 The version displayed is probably the good version, you can also get more information with php -i or php -v if you just want the version.

Ubuntu 16.04附带PHP7,没有PHP5包。 删除所有php7包: sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "

新的PPA sudo add-apt-repository ppa:ondrej/php

更新包: sudo apt-get update

安装PHP: sudo apt-get install php5.6

检查PHP版本: php -v

Ubuntu 16.04 co

...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值