麻烦在CentOS 6上安装php-devel

我试图在CentOSOS 6上安装PHP的mongo驱动程序。运行“pecl install mongo”时抱怨说“php-devel软件包是必需的”。

运行“yum install php-devel”会出现以下错误:

Loaded plugins: fastestmirror, presto, priorities Loading mirror speeds from cached hostfile * base: mirrors.usc.edu * epel: mirrors.xmission.com * extras: centos.sonn.com * updates: mirror.hmc.edu Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package php-devel.x86_64 0:5.3.3-14.el6_3 will be installed --> Processing Dependency: php = 5.3.3-14.el6_3 for package: php-devel-5.3.3-14.el6_3.x86_64 --> Processing Dependency: automake for package: php-devel-5.3.3-14.el6_3.x86_64 --> Processing Dependency: autoconf for package: php-devel-5.3.3-14.el6_3.x86_64 --> Running transaction check ---> Package autoconf.noarch 0:2.63-5.1.el6 will be installed ---> Package automake.noarch 0:1.11.1-1.2.el6 will be installed ---> Package php-devel.x86_64 0:5.3.3-14.el6_3 will be installed --> Processing Dependency: php = 5.3.3-14.el6_3 for package: php-devel-5.3.3-14.el6_3.x86_64 --> Finished Dependency Resolution Error: Package: php-devel-5.3.3-14.el6_3.x86_64 (updates) Requires: php = 5.3.3-14.el6_3 Installed: php-5.3.15-1.el6.remi.x86_64 (@remi) php = 5.3.15-1.el6.remi Available: php-5.3.3-3.el6_2.8.x86_64 (base) php = 5.3.3-3.el6_2.8 Available: php-5.3.3-14.el6_3.x86_64 (updates) php = 5.3.3-14.el6_3 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest 

有什么build议么? 它看起来像试图安装5.3.3-14,而不是5.3.3-15 devel,但我不知道如何改变这一点。

它看起来像是从php-5.3.15-1.el6.remi.x86_64 repo安装的php-5.3.15-1.el6.remi.x86_64 ,但是这个repo不再可用或启用。

先试试这个:

 yum --enablerepo=remi install php-devel 

如果您信任第三方回购,您应该可以通过以下步骤启用它:

 wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm sudo vim /etc/yum.repos.d/remi.repo -> enabled=1 

有关更多详细信息,请参见http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x

看起来像你从REMI库升级到5.3.15的PHP

 Installed: php-5.3.15-1.el6.remi.x86_64 (@remi) 

不过,看起来你已经从yum回收库中删除了REMI存储库,因为我没有在列表中看到任何remi镜像。 您目前启用的回购站没有可用的正确版本的php-devel。 您需要重新添加REMI存储库,然后安装与您当前安装的PHP版本相匹配的php-devel版本。 在你的情况下,你需要php-devel-5.3.15。

安装说明REMI: http : //blog.famillecollet.com/pages/Config-en

额外的CentOS回购: http : //wiki.centos.org/AdditionalResources/Repositories/