解决“php54w-common-5.4.24-1.w6.x86_64冲突php-common <5.4.0”

我们正在运行CentOS版本6.5和PHP 5.4.24,我试图安装mcrypt-php。

当我按照https://stackoverflow.com/questions/17109818/install-php-mcrypt-on-centos6中的说明,但是,过程出错。

Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package php-mcrypt.x86_64 0:5.3.3-3.el6 will be installed --> Processing Dependency: php(zend-abi) = 20090626 for package: php-mcrypt-5.3.3-3.el6.x86_64 --> Processing Dependency: php(api) = 20090626 for package: php-mcrypt-5.3.3-3.el6.x86_64 --> Running transaction check ---> Package php-common.x86_64 0:5.3.3-27.el6_5 will be installed --> Processing Conflict: php54w-common-5.4.24-1.w6.x86_64 conflicts php-common < 5.4.0 --> Finished Dependency Resolution Error: php54w-common conflicts with php-common-5.3.3-27.el6_5.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest 

我感觉我需要升级/卸载/重新安装PHP ,但我只find了如何为php53做到这一点的指示,我不想冒险把服务器离线。

有什么想法吗?

看起来你正在使用第三方回购提供PHP 5.4,并且该回购的php54w-common包与php-mcrypt(大概来自epel)相冲突,而这正是期望默认的CentOS 6版本PHP常见。

您的第三方PHP提供商可能会提供他们自己的mcrypt版本(尝试yum info php54w-mcrypt ,看看是否给你任何东西)。 否则,你运气不好,你需要:

  1. find另一个php mcrypt与php54w-common兼容的包
  2. 恢复到CentOS支持的PHP 5.3而不是使用PHP 5.4
  3. 构build您自己的PHP 5.4 mcrypt包,从您的第三方提供商处获得

祝你好运!