YUM 不会在 CentOS 6.5 和 PHP 5.4 上安装 php-pecl-memcached


YUM not installing php-pecl-memcached on CentOS 6.5 with PHP 5.4

我在使用 CentOS 6.5 和 PHP 5.4 上的 YUM 安装 Memcached (带有 D) PHP 扩展时遇到了一些问题。当我运行yum install php-pecl-memcached时,我会看到以下内容:

Loaded plugins: downloadonly, fastestmirror, replace
Loading mirror speeds from cached hostfile
 * webtatic: us-east.repo.webtatic.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-pecl-memcached.x86_64 0:1.0.0-1.el6 will be installed
--> Processing Dependency: php(zend-abi) = 20090626 for package: php-pecl-memcached-1.0.0-1.el6.x86_64
--> Processing Dependency: php(api) = 20090626 for package: php-pecl-memcached-1.0.0-1.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.26-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

我相信我理解的问题在于 YUM 存储库中的 memcached 版本需要 php-common-5.3,但我不太明白如何超越这个问题或在哪里找到与我的配置兼容的版本。

卸载

php54w-common然后安装php-pecl-memcached应该有助于解决冲突:

yum remove php54w-common
yum install php-pecl-memcached

但是,也许你可以使用软件集合(适用于 CentOS)而不是php54w-common来自的存储库。有 PHP 5.4 和 5.5:

  • https://www.softwarecollections.org/en/scls/rhscl/php55/
  • https://www.softwarecollections.org/en/scls/rhscl/php54/

但也有更多的PHP构建:

https://www.softwarecollections.org/en/scls/?search=php