2

我必须安装 mCrypt。我已经检查了这些方法: Install php-mcrypt on CentOS 6

并没有为我工作。在我尝试使用它之后: sudo yum install epel-release sudo yum install libmcrypt-devel

如果您正在运行默认的 PHP 安装,您还需要运行以下命令...

sudo yum 安装 php-mcrypt

得到了这个:

[root@development ~]# sudo yum install libmcrypt-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.ciril.fr
 * epel: mirror.nl.leaseweb.net
 * extras: ftp.ciril.fr
 * updates: ftp.ciril.fr
Resolving Dependencies
--> Running transaction check
---> Package libmcrypt-devel.x86_64 0:2.5.8-9.el6 will be installed
--> Processing Dependency: libmcrypt = 2.5.8-9.el6 for package: libmcrypt-devel-2.5.8-9.el6.x86_64
--> Running transaction check
---> Package libmcrypt.i686 0:2.5.8-9.el6 will be installed
--> Finished Dependency Resolution
Error:  Multilib version problems found. This often means that the root
       cause is something else and multilib version checking is just
       pointing out that there is a problem. Eg.:

         1. You have an upgrade for libmcrypt which is missing some
            dependency that another package requires. Yum is trying to
            solve this by installing an older version of libmcrypt of the
            different architecture. If you exclude the bad architecture
            yum will tell you what the root cause is (which package
            requires what). You can try redoing the upgrade with
            --exclude libmcrypt.otherarch ... this should give you an error
            message showing the root cause of the problem.

         2. You have multiple architectures of libmcrypt installed, but
            yum can only see an upgrade for one of those architectures.
            If you don't want/need both architectures anymore then you
            can remove the one with the missing update and everything
            will work.

         3. You have duplicate versions of libmcrypt installed already.
            You can use "yum check" to get yum show these errors.

       ...you can also use --setopt=protected_multilib=false to remove
       this checking, however this is almost never the correct thing to
       do as something else is very likely to go wrong (often causing
       much more problems).

       Protected multilib versions: libmcrypt-2.5.8-9.el6.i686 != libmcrypt-2.5.8-13.el7.x86_64
[root@development ~]# sudo yum install php-mcrypt
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.ciril.fr
 * epel: epel.mirrors.ovh.net
 * extras: ftp.ciril.fr
 * updates: ftp.ciril.fr
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
--> Finished Dependency Resolution
Error: Package: php-mcrypt-5.3.3-3.el6.x86_64 (epel)
           Requires: php(api) = 20090626
           Installed: php-common-5.4.16-36.el7_1.x86_64 (@updates)
               php(api) = 20100412-64
           Available: php-common-5.4.16-23.el7_0.3.x86_64 (base)
               php(api) = 20100412-64
Error: Package: php-mcrypt-5.3.3-3.el6.x86_64 (epel)
           Requires: php(zend-abi) = 20090626
           Installed: php-common-5.4.16-36.el7_1.x86_64 (@updates)
               php(zend-abi) = 20100525-64
           Available: php-common-5.4.16-23.el7_0.3.x86_64 (base)
               php(zend-abi) = 20100525-64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@development ~]#

有什么帮助吗?先感谢您

4

1 回答 1

2

你可以尝试搜索相同的

yum search php-mcrypt

并按照以下步骤操作:

yum clean all
yum update

yum install php7*-mcrypt

或者

yum install php*-mcrypt
于 2020-02-27T04:10:58.530 回答