CentOS 6.4 PHP MCrypt

CentOS 6.4 PHP MCrypt

我正在尝试php-mcrypt为我的 CentOs 6.4 服务器安装扩展,但是它失败并显示以下消息:

[root@vps /]# yum install php-mcrypt
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.vooservers.com
 * epel: mirror01.th.ifl.net
 * epel-debuginfo: mirror01.th.ifl.net
 * epel-source: mirror01.th.ifl.net
 * extras: mirrors.vooservers.com
 * updates: mirrors.vooservers.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mcrypt.i386 0:5.1.6-5.el5 will be installed
--> Processing Dependency: php-api = 20041225 for package: php-mcrypt-5.1.6-5.el5.i386
--> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt-5.1.6-5.el5.i386
--> Running transaction check
---> Package libmcrypt.i386 0:2.5.7-5.el5 will be installed
---> Package php-mcrypt.i386 0:5.1.6-5.el5 will be installed
--> Processing Dependency: php-api = 20041225 for package: php-mcrypt-5.1.6-5.el5.i386
--> Finished Dependency Resolution
Error: Package: php-mcrypt-5.1.6-5.el5.i386 (epel)
           Requires: php-api = 20041225
           Installed: php-common-5.3.3-22.el6.i686 (@base)
               php-api = 20090626
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

据我所知,我已经正确安装了 repos,这是我的 epel.repo 文件:

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

我的回复者:

repo id          repo name                                                status
base             CentOS-6 - Base                                          4,802
epel             Extra Packages for Enterprise Linux 6 - i386             5,931
epel-debuginfo   Extra Packages for Enterprise Linux 6 - i386 - Debug     1,816
epel-source      Extra Packages for Enterprise Linux 6 - i386 - Source        0
extras           CentOS-6 - Extras                                           12
updates          CentOS-6 - Updates                                         481
repolist: 13,042

我甚至安装了 remi,但似乎无法为 ZF2 安装 php-mcrypt 扩展。出于某种原因,它似乎正在从 repo 中提取,el5尽管我的所有 repo 都是el6

有人知道发生了什么事吗?

谢谢

弥敦道

答案1

首先使用以下方法清理 yum 缓存

yum clean all

相关内容