如何在centos 6中将php 5.3更新为5.4而不会出错?

Posted

技术标签:

【中文标题】如何在centos 6中将php 5.3更新为5.4而不会出错?【英文标题】:how to update php 5.3 to 5.4 in centos 6 without error? 【发布时间】:2017-08-19 05:26:47 【问题描述】:

从solution,我使用remi repo 到yum update php* 到版本5.4 但是得到: `--> 完成依赖解析

Error: Package: php-pecl-jsonc-1.3.10-1.el6.remi.5.4.x86_64 (remi)
           Requires: php(zend-abi) = 20100525-x86-64
           Removing: php-common-5.3.3-48.el6_8.x86_64 (@updates)
               php(zend-abi) = 20090626
           Updated By: php-common-5.6.30-2.el6.remi.x86_64 (remi-test)
               php(zend-abi) = 20131226-64
           Available: php-common-5.3.3-47.el6.x86_64 (base)
               php(zend-abi) = 20090626
           Available: php-common-5.4.45-13.el6.remi.x86_64 (remi)
               php(zend-abi) = 20100525-x86-64
           Available: php-common-5.6.30-0.1.RC1.el6.remi.x86_64 (remi-test)
               php(zend-abi) = 20131226-64
Error: Package: php-mysql-5.4.45-13.el6.remi.x86_64 (remi)
           Requires: php-pdo(x86-64) = 5.4.45-13.el6.remi
           Removing: php-pdo-5.3.3-48.el6_8.x86_64 (@updates)
               php-pdo(x86-64) = 5.3.3-48.el6_8
           Updated By: php-pdo-5.6.30-2.el6.remi.x86_64 (remi-test)
               php-pdo(x86-64) = 5.6.30-2.el6.remi
           Available: php-pdo-5.3.3-47.el6.x86_64 (base)
               php-pdo(x86-64) = 5.3.3-47.el6
           Available: php-pdo-5.4.45-13.el6.remi.x86_64 (remi)
               php-pdo(x86-64) = 5.4.45-13.el6.remi
           Available: php-pdo-5.6.30-0.1.RC1.el6.remi.x86_64 (remi-test)
               php-pdo(x86-64) = 5.6.30-0.1.RC1.el6.remi

 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

`

我不知道是什么问题,感谢您的帮助!

【问题讨论】:

你的 yum repo 有不同的 php 版本:像这样:可用:php-pdo-5.4.45-13.el6.remi.x86_64 (remi) php-pdo(x86-64) = 5.4。 45-13.el6.remi 可用:php-pdo-5.6.30-0.1.RC1.el6.remi.x86_64 (remi-test) php-pdo(x86-64) = 5.6.30-0.1.RC1.el6。雷米 【参考方案1】:

错误:包:php-pecl-jsonc-1.3.10-1.el6.remi.5.4.x86_64 (remi)

更新者:php-common-5.6.30-2.el6.remi.x86_64 (remi-test)

禁用“remi-test”(如果你想测试不稳定的包除外,但在这种情况下,你需要,至少 php 5.6,在“remi-php56”)

【讨论】:

收集,我正在使用 mysql5.7.Disabled remi-test,仍然得到错误:包:php-mysql-5.4.45-13.el6.remi.x86_64 (remi) 要求:libmysqlclient。 so.18(libmysqlclient_18)(64bit) 可用:mysql-libs-5.5.53-1.el6.remi.x86_64 (remi) libmysqlclient.so.18(libmysqlclient_18)(64bit) 可用:mysql-libs-5.5.54- 1.el6.remi.x86_64 (remi) libmysqlclient.so.18(libmysqlclient_18)(64bit) 可用:mysql-libs-5.1.73-7.el6.i686 (base) 未找到 你必须切换到php-mysqlnd,而不是php-mysql,它对libmysqlclient没有任何依赖,或者使用compat-mysql55(更好的方法是使用“remi-php54”代替“remi”,在所有情况下,永远不要“remi-test”) 请注意 PHP 5.4 已经停产,即使 "remi-php54" 存储库中的包有一些安全性的反向移植,所以你真的应该考虑使用任何 PHP 版本 > 5.6。 rpms.famillecollet.com/enterprise/remi-release-6.rpm 没有remi-php54,你能告诉我如何得到它吗? 它有它:$ rpm -qf /etc/yum.repos.d/remi-php54.repo => remi-release-6.8-2.el6.remi.noarch(也许需要更新remi-release 优先)

以上是关于如何在centos 6中将php 5.3更新为5.4而不会出错?的主要内容,如果未能解决你的问题,请参考以下文章

在 CentOS 6.10 中将 PHP 5.5.38 升级到 PHP 7 [重复]

在 CentOS 上将 PHP 5.3 更新到 PHP 5.5 后,我无法访问 phpmyadmin

如何安装CentOS 6.x操作系统

Php 5.3 mcrypt 无法在 CentOS 6.3 32 位上运行

如何安装CentOS 6.x操作系统

centOS怎样强制卸载PHP以及自定义安装PHP