How to fix “Missing Dependency: php-api” when installing mcrypt module

Question:

I get the error “Missing Dependency: php-api” when trying to use yum to install php’s mcrypt module. How do I fix this?

Answer:

You likely installed/upgraded php using non-centos sources (usually the remi rpms). Try this:


yum -y --enablerepo=remi install php-mcrypt

(notice the added –enablerepo=remi)

What is happening in this case is that your php rpm is from remi but when you install php-mcrypt it is trying to use the default centos repositories. You need to tell it to also get php-mcrypt from the remi repository.

Leave a Reply

Your email address will not be published. Required fields are marked *