Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to install the mongo drivers for PHP on CentosOS 6. Running "pecl install mongo" complains that "php-devel package is required".

Running "yum install php-devel" gives the following error:

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

Any suggestions? It looks like it's trying to install devel for 5.3.3-14 rather than 5.3.3-15, but I'm not sure how to change that.

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

It looks like php-5.3.15-1.el6.remi.x86_64 was installed from the remi repo, but that repo is no longer available or enabled.

Try this first:

yum --enablerepo=remi install php-devel

If you trust third-party repos, you should be able to enable it with these steps:

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

See http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x for more details.

share|improve this answer
add comment

Looks like you upgraded PHP to 5.3.15 from the REMI repository

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

However, it looks like you have since removed the REMI repository from your yum repos, since I don't see any remi mirrors in the list there. Your currently enabled repos don't have the correct version of php-devel available. You'll need to re-add the REMI repository, and then install the php-devel version that matches your currently installed PHP version from there. In your case, you'll need php-devel-5.3.15.

Install Instructions for REMI: http://blog.famillecollet.com/pages/Config-en

Additional CentOS repos: http://wiki.centos.org/AdditionalResources/Repositories/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.