Centos PHP 升级失败

Centos PHP 升级失败

我需要从 PHP 5.x 升级到 7

使用 yum 删除旧组件 - 删除 php* 安装了 remi repo,更新了所有安装似乎有效,但它存在 m-crypt 问题,我不确定如何修复它?输出如下

# yum install php-mcrypt

Loaded plugins: fastestmirror, langpacks, replace
Loading mirror speeds from cached hostfile
 * base: mirror.intergrid.com.au
 * epel: fedora.uberglobalmirror.com
 * extras: mirror.intergrid.com.au
 * ius: ius.mirror.digitalpacific.com.au
 * remi-safe: remi.conetix.com.au
 * updates: mirror.intergrid.com.au
Resolving Dependencies
--> Running transaction check
---> Package php-mcrypt.x86_64 0:5.4.16-7.el7 will be installed
--> Processing Dependency: php(zend-abi) = 20100525-64 for package: php-mcrypt-5.4.16-7.el7.x86_64
--> Processing Dependency: php(api) = 20100412-64 for package: php-mcrypt-5.4.16-7.el7.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.4.16-42.el7 will be installed
--> Processing Conflict: php70u-common-7.0.19-1.ius.centos7.x86_64 conflicts php-common < 7.0.19
--> Finished Dependency Resolution
Error: php70u-common conflicts with php-common-5.4.16-42.el7.x86_64
 You could try using --skip-broken to work around the problem
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
ipa-client-4.4.0-14.el7.centos.7.x86_64 has installed conflicts freeipa-client: ipa-client-4.4.0-14.el7.centos.7.x86_64
ipa-client-common-4.4.0-14.el7.centos.7.noarch has installed conflicts freeipa-client-common: ipa-client-common-4.4.0-14.el7.centos.7.noarch
ipa-common-4.4.0-14.el7.centos.7.noarch has installed conflicts freeipa-common: ipa-common-4.4.0-14.el7.centos.7.noarch

# rpm -qa | grep php

php70-php-cli-7.0.20-1.el7.remi.x86_64
php70-php-pecl-memcache-3.0.9-0.7.20161124gitdf7735e.el7.remi.x86_64
php70-php-process-7.0.20-1.el7.remi.x86_64
php70-php-pecl-zip-1.14.0-1.el7.remi.x86_64
mod_php70u-7.0.19-1.ius.centos7.x86_64
php70-php-pecl-geoip-1.1.1-1.el7.remi.x86_64
php70-php-json-7.0.20-1.el7.remi.x86_64
php70-php-mcrypt-7.0.20-1.el7.remi.x86_64
php70-runtime-1.0-5.el7.remi.x86_64
php70-php-opcache-7.0.20-1.el7.remi.x86_64
php70u-common-7.0.19-1.ius.centos7.x86_64
php70-php-xml-7.0.20-1.el7.remi.x86_64
php70-php-pecl-xmldiff-1.1.2-6.el7.remi.x86_64
php70-php-tidy-7.0.20-1.el7.remi.x86_64
php70-php-common-7.0.20-1.el7.remi.x86_64
php70-php-xmlrpc-7.0.20-1.el7.remi.x86_64
php70-php-pecl-json-post-1.0.1-3.el7.remi.x86_64
php70u-mysqlnd-7.0.19-1.ius.centos7.x86_64
php70-php-pecl-apcu-bc-1.0.3-1.el7.remi.x86_64
php70-php-pspell-7.0.20-1.el7.remi.x86_64
php70-php-gd-7.0.20-1.el7.remi.x86_64
php70u-pdo-7.0.19-1.ius.centos7.x86_64
php70-php-mbstring-7.0.20-1.el7.remi.x86_64
php70u-cli-7.0.19-1.ius.centos7.x86_64
php70-php-soap-7.0.20-1.el7.remi.x86_64
php70-php-pecl-apcu-5.1.8-1.el7.remi.x86_64
php70-php-pecl-imagick-3.4.3-1.el7.remi.x86_64
php70-php-devel-7.0.20-1.el7.remi.x86_64
php70-php-pear-1.10.4-2.el7.remi.noarch

有人能给我指点迷津吗?我该如何“消灭”它并重新开始?或者需要更多信息来解决

谢谢

答案1

php70u您的安装中包含来自 IUS repo 的 PHP7 部分。在尝试从 Remi 的 repo 安装 PHP 之前,请先删除所有带该名称的内容。

此外,您似乎在 IPA 客户端库中遇到了一些冲突。

答案2

您安装了 2 个 PHP 堆栈,这显然没有必要。

  • 来自 IUS 的 php70u-*
  • Remi 的 php70-php-*

对于 Remi 存储库的使用,我建议你只需遵循巫师指示。

因此,就您而言,您需要来自 remi 的 php70-php-mcrypt(或者在 IUS 情况下需要 php70u-mcrpypt,或者如果您从“remi-php70”中选择“单一版本”,则需要 php-mycrypt)

顺便说一句,关于 mcrypt 扩展,我建议你阅读:关于 libmcrypt 和 php-mcrypt

相关内容