我有一台专用服务器金苏菲我正在尝试使用以下方法在 CentOS 6.7 上将 PHP 5.3 更新到 PHP 5.5本指南,但不幸的是我收到以下错误:
Error: Package: php-mysql-5.4.45-1.el6.remi.x86_64 (remi)
Requires: php-pdo(x86-64) = 5.4.45-1.el6.remi
Removing: php-pdo-5.3.3-27.el6.2.x86_64 (@LocalRepo)
php-pdo(x86-64) = 5.3.3-27.el6.2
Updated By: php-pdo-5.5.29-1.el6.remi.x86_64 (remi-php55)
php-pdo(x86-64) = 5.5.29-1.el6.remi
Available: php-pdo-5.4.44-1.el6.remi.x86_64 (remi)
php-pdo(x86-64) = 5.4.44-1.el6.remi
Available: php-pdo-5.4.45-1.el6.remi.x86_64 (remi)
php-pdo(x86-64) = 5.4.45-1.el6.remi
Available: php-pdo-5.5.28-1.el6.remi.x86_64 (remi-php55)
php-pdo(x86-64) = 5.5.28-1.el6.remi
Available: php54w-pdo-5.4.44-1.w6.x86_64 (webtatic)
php-pdo(x86-64) = 5.4.44-1.w6
Available: php55w-pdo-5.5.28-1.w6.x86_64 (webtatic)
php-pdo(x86-64) = 5.5.28-1.w6
Available: php56w-pdo-5.6.12-1.w6.x86_64 (webtatic)
php-pdo(x86-64) = 5.6.12-1.w6
Error: Package: php-pecl-apc-3.1.9-2.el6.x86_64 (@base)
Requires: php(api) = 20090626
Removing: php-common-5.3.3-27.el6.2.x86_64 (@LocalRepo)
php(api) = 20090626
Updated By: php-common-5.5.29-1.el6.remi.x86_64 (remi-php55)
php(api) = 20121113-64
Available: php-common-5.4.44-1.el6.remi.x86_64 (remi)
php(api) = 20100412-x86-64
Available: php-common-5.4.45-1.el6.remi.x86_64 (remi)
php(api) = 20100412-x86-64
Available: php-common-5.5.28-1.el6.remi.x86_64 (remi-php55)
php(api) = 20121113-64
Available: php54w-common-5.4.44-1.w6.x86_64 (webtatic)
php(api) = 20100412-64
Available: php55w-common-5.5.28-1.w6.x86_64 (webtatic)
php(api) = 20121113-64
Installing: php56w-common-5.6.12-1.w6.x86_64 (webtatic)
php(api) = 20131106-64
Error: Package: php-pecl-apc-3.1.9-2.el6.x86_64 (@base)
Requires: php(zend-abi) = 20090626
Removing: php-common-5.3.3-27.el6.2.x86_64 (@LocalRepo)
php(zend-abi) = 20090626
Updated By: php-common-5.5.29-1.el6.remi.x86_64 (remi-php55)
php(zend-abi) = 20121212-64
Available: php-common-5.4.44-1.el6.remi.x86_64 (remi)
php(zend-abi) = 20100525-x86-64
Available: php-common-5.4.45-1.el6.remi.x86_64 (remi)
php(zend-abi) = 20100525-x86-64
Available: php-common-5.5.28-1.el6.remi.x86_64 (remi-php55)
php(zend-abi) = 20121212-64
Available: php54w-common-5.4.44-1.w6.x86_64 (webtatic)
php(zend-abi) = 20100525-64
Available: php55w-common-5.5.28-1.w6.x86_64 (webtatic)
php(zend-abi) = 20121212-64
Installing: php56w-common-5.6.12-1.w6.x86_64 (webtatic)
php(zend-abi) = 20131226-64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
它们到底是什么意思以及我该如何解决它们?
答案1
您有一个名为webtatic
“installed”的冲突存储库。请删除此存储库(以及从中安装的所有软件包)。
完成后,运行yum distro-sync
以将您的系统同步到存储库中最新版本的软件包。
此时,您可以安装所需的任何附加软件包。
答案2
PHP 5.5 没有 APC 扩展,您应该切换到 Zend Opcache。
我提交了 Webtatic 的答案,因为我是它的维护者,我不喜欢 Remi 存储库旧 RPM 和 SCL 新 RPM 缺乏软件包固定。前者的方式也会让这个问题更清楚。
由于您已经安装了 Webtatic repo,您可以运行:
yum install yum-plugin-replace
yum replace php-common --replace-with=php55w-common
yum install php55w-opcache
如果想坚持使用 Remi 的 php55 repo,也可以通过另一种方式解决这个问题:
yum remove php-pecl-apc
yum update php*
yum install php-opcache