How to install mcrypt for PHP 5.3.3 on CentOS 5.7 64 bit?

Buttle Butkus asked:

I installed php 5.3 and some modules using

yum install php53-{module-name}

But mcrypt did not work.

I searched like this:

yum list php* | grep mcry

The only package that came up was

php-mcrypt.x86-64         5.1.6-15.e15.centos.1    extras

I have the same exact problem with mhash.
The results for php are even more confusing.

I know this is probably a dumb question, but any help would be appreciated. I am used to Ubuntu’s simple “apt-get install” and everything works. CentOS seems to be a lot more detail oriented.

Thanks.

EDIT: Here’s what I tried:

yum install php53-mcrypt

Result:

No package php53-mcrypt available

And trying this:

yum install php-mcrypt

Results in:

Error: php53-common conflicts with php-common

Because php-mcrypt tries to get php-common as a dependency (?) and I am trying to use php 5.3 rather than the default php 5.1 on CentOS 5.7.

My answer:


Since people are still coming here, I’m going to throw in an answer I haven’t seen yet.

I run CentOS but I also need to keep current with PHP and MySQL, with later versions than Red Hat chooses to provide. To solve this problem, I use the remi repository, which provides current packages of PHP, MySQL, Symfony and a few other things for CentOS.

(And I just decommissioned the last CentOS 5 box less than an hour ago, hooray!)


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.