![尝试安装 memcached 错误](https://linux22.com/image/699575/%E5%B0%9D%E8%AF%95%E5%AE%89%E8%A3%85%20memcached%20%E9%94%99%E8%AF%AF.png)
尝试安装 memcached php 时出现以下错误
yum install php-pecl-memcache
Loaded plugins: fastestmirror, security, universal-hooks
Setting up Install Process
Loading mirror speeds from cached hostfile
* EA4: 208.100.0.204
* base: chicago.gaminghost.co
* epel: mirror.unl.edu
* extras: denver.gaminghost.co
* remi: repo1.dal.innoscale.net
* remi-safe: repo1.dal.innoscale.net
* updates: mirror.sesp.northwestern.edu
remi | 2.9 kB 00:00
Resolving Dependencies
--> Running transaction check
---> Package php-pecl-memcache.x86_64 0:3.0.8-2.el6.remi.5.4 will be installed
--> Processing Dependency: php(zend-abi) = 20100525-x86-64 for package: php-pecl-memcache-3.0.8-2.el6.remi.5.4.x86_64
--> Processing Dependency: php(api) = 20100412-x86-64 for package: php-pecl-memcache-3.0.8-2.el6.remi.5.4.x86_64
--> Processing Dependency: /usr/bin/pecl for package: php-pecl-memcache-3.0.8-2.el6.remi.5.4.x86_64
--> Processing Dependency: /usr/bin/pecl for package: php-pecl-memcache-3.0.8-2.el6.remi.5.4.x86_64
--> Running transaction check
---> Package php-pear.noarch 1:1.10.1-12.el6.remi will be installed
--> Processing Dependency: php-xml for package: 1:php-pear-1.10.1-12.el6.remi.noarch
--> Processing Dependency: php-posix for package: 1:php-pear-1.10.1-12.el6.remi.noarch
--> Processing Dependency: php-cli for package: 1:php-pear-1.10.1-12.el6.remi.noarch
---> Package php-pecl-memcache.x86_64 0:3.0.8-2.el6.remi.5.4 will be installed
--> Processing Dependency: php(zend-abi) = 20100525-x86-64 for package: php-pecl-memcache-3.0.8-2.el6.remi.5.4.x86_64
--> Processing Dependency: php(api) = 20100412-x86-64 for package: php-pecl-memcache-3.0.8-2.el6.remi.5.4.x86_64
--> Running transaction check
---> Package php-cli.x86_64 0:5.4.45-13.el6.remi will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.45-13.el6.remi for package: php-cli-5.4.45-13.el6.remi.x86_64
---> Package php-pecl-memcache.x86_64 0:3.0.8-2.el6.remi.5.4 will be installed
--> Processing Dependency: php(zend-abi) = 20100525-x86-64 for package: php-pecl-memcache-3.0.8-2.el6.remi.5.4.x86_64
--> Processing Dependency: php(api) = 20100412-x86-64 for package: php-pecl-memcache-3.0.8-2.el6.remi.5.4.x86_64
---> Package php-process.x86_64 0:5.4.45-13.el6.remi will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.45-13.el6.remi for package: php-process-5.4.45-13.el6.remi.x86_64
---> Package php-xml.x86_64 0:5.4.45-13.el6.remi will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.45-13.el6.remi for package: php-xml-5.4.45-13.el6.remi.x86_64
--> Finished Dependency Resolution
Error: Package: php-xml-5.4.45-13.el6.remi.x86_64 (remi)
Requires: php-common(x86-64) = 5.4.45-13.el6.remi
Installed: php-common-5.5.38-7.el6.remi.x86_64 (@remi-php55)
php-common(x86-64) = 5.5.38-7.el6.remi
Available: php-common-5.3.3-47.el6.x86_64 (base)
php-common(x86-64) = 5.3.3-47.el6
Available: php-common-5.3.3-48.el6_8.x86_64 (updates)
php-common(x86-64) = 5.3.3-48.el6_8
Available: php-common-5.4.45-12.el6.remi.x86_64 (remi)
php-common(x86-64) = 5.4.45-12.el6.remi
Available: php-common-5.4.45-13.el6.remi.x86_64 (remi)
php-common(x86-64) = 5.4.45-13.el6.remi
Error: Package: php-pecl-memcache-3.0.8-2.el6.remi.5.4.x86_64 (remi)
Requires: php(zend-abi) = 20100525-x86-64
Installed: php-common-5.5.38-7.el6.remi.x86_64 (@remi-php55)
php(zend-abi) = 20121212-64
Available: php-common-5.3.3-47.el6.x86_64 (base)
php(zend-abi) = 20090626
Available: php-common-5.3.3-48.el6_8.x86_64 (updates)
php(zend-abi) = 20090626
Available: php-common-5.4.45-12.el6.remi.x86_64 (remi)
php(zend-abi) = 20100525-x86-64
Available: php-common-5.4.45-13.el6.remi.x86_64 (remi)
php(zend-abi) = 20100525-x86-64
Error: Package: php-pecl-memcache-3.0.8-2.el6.remi.5.4.x86_64 (remi)
Requires: php(api) = 20100412-x86-64
Installed: php-common-5.5.38-7.el6.remi.x86_64 (@remi-php55)
php(api) = 20121113-64
Available: php-common-5.3.3-47.el6.x86_64 (base)
php(api) = 20090626
Available: php-common-5.3.3-48.el6_8.x86_64 (updates)
php(api) = 20090626
Available: php-common-5.4.45-12.el6.remi.x86_64 (remi)
php(api) = 20100412-x86-64
Available: php-common-5.4.45-13.el6.remi.x86_64 (remi)
php(api) = 20100412-x86-64
Error: Package: php-process-5.4.45-13.el6.remi.x86_64 (remi)
Requires: php-common(x86-64) = 5.4.45-13.el6.remi
Installed: php-common-5.5.38-7.el6.remi.x86_64 (@remi-php55)
php-common(x86-64) = 5.5.38-7.el6.remi
Available: php-common-5.3.3-47.el6.x86_64 (base)
php-common(x86-64) = 5.3.3-47.el6
Available: php-common-5.3.3-48.el6_8.x86_64 (updates)
php-common(x86-64) = 5.3.3-48.el6_8
Available: php-common-5.4.45-12.el6.remi.x86_64 (remi)
php-common(x86-64) = 5.4.45-12.el6.remi
Available: php-common-5.4.45-13.el6.remi.x86_64 (remi)
php-common(x86-64) = 5.4.45-13.el6.remi
Error: Package: php-cli-5.4.45-13.el6.remi.x86_64 (remi)
Requires: php-common(x86-64) = 5.4.45-13.el6.remi
Installed: php-common-5.5.38-7.el6.remi.x86_64 (@remi-php55)
php-common(x86-64) = 5.5.38-7.el6.remi
Available: php-common-5.3.3-47.el6.x86_64 (base)
php-common(x86-64) = 5.3.3-47.el6
Available: php-common-5.3.3-48.el6_8.x86_64 (updates)
php-common(x86-64) = 5.3.3-48.el6_8
Available: php-common-5.4.45-12.el6.remi.x86_64 (remi)
php-common(x86-64) = 5.4.45-12.el6.remi
Available: php-common-5.4.45-13.el6.remi.x86_64 (remi)
php-common(x86-64) = 5.4.45-13.el6.remi
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
运行 centos 6.8 php 5.6
现在正在关注
事务检查错误:安装 php-cli-5.5.38-7.el6.remi.x86_64 时的文件 /usr/bin/php 与软件包 ea-php-cli-0.2.0-1.1.1.cpanel.x86_64 中的文件冲突
仍然出现错误
Error: Package: php-cli-5.4.45-13.el6.remi.x86_64 (remi)
Requires: php-common(x86-64) = 5.4.45-13.el6.remi
Installed: php-common-5.5.38-7.el6.remi.x86_64 (@remi-php55)
php-common(x86-64) = 5.5.38-7.el6.remi
Available: php-common-5.3.3-47.el6.x86_64 (base)
php-common(x86-64) = 5.3.3-47.el6
Available: php-common-5.3.3-48.el6_8.x86_64 (updates)
php-common(x86-64) = 5.3.3-48.el6_8
Available: php-common-5.4.45-12.el6.remi.x86_64 (remi)
php-common(x86-64) = 5.4.45-12.el6.remi
Available: php-common-5.4.45-13.el6.remi.x86_64 (remi)
php-common(x86-64) = 5.4.45-13.el6.remi
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
答案1
已安装:php-common-5.5.38-7.el6.remi.x86_64 (@remi-php55)
您已从“remi-php55”存储库安装了 PHP 5.5
因此您需要从同一个存储库中提取扩展。
更简单的方法是默认启用它:
yum install yum-utils
yum-config-manager --enable remi-php55
yum install php-pecl-memcache
正如巫师指示。
注意:PHP 5.5 自 2016 年 7 月起已停止使用,因此我诚挚建议您考虑更新到受支持的版本 (5.6+),从而启用 remi-php56 存储库。
答案2
步骤#1:安装Memcached PHP扩展
首先,清理 yum:
yum clean all
作为最佳实践,我们将更新我们的软件包:
yum -y update
然后安装 PHP Memcached 扩展和相关包现在就像运行一个命令一样简单:
yum -y install php-pecl-memcache
步骤#2:验证安装重新启动 memcached 和 httpd:
systemctl restart memcached
systemctl restart httpd
使用以下命令查看已安装的PHP模块的信息:
php -m | grep memcache