Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having a very hard time getting mcrypt for PHP installed on a Red Hat 4 server. I've downloaded the rpm but it tells me:

error: Failed dependencies:
    php-common(x86-32) = 5.4.7-2.fc18 is needed by php-mcrypt-5.4.7-2.fc18.i686
    rpmlib(FileDigests) <= 4.6.0-1 is needed by php-mcrypt-5.4.7-2.fc18.i686 is needed by php-mcrypt-5.4.7-2.fc18.i686 is needed by php-mcrypt-5.4.7-2.fc18.i686
    rtld(GNU_HASH) is needed by php-mcrypt-5.4.7-2.fc18.i686
    rpmlib(PayloadIsXz) <= 5.2-1 is needed by php-mcrypt-5.4.7-2.fc18.i686

So when I try to install one of those packages, they also require another 8 packages. So I'm diving into dependency hell here. Now if I try to compile mcrypt from source, this is what I get:

checking for libmcrypt - version >= 2.5.0... no
*** Could not run libmcrypt test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means LIBMCRYPT was incorrectly installed
*** or that you have moved LIBMCRYPT since it was installed. In the latter case, you
*** may want to edit the libmcrypt-config script: no
configure: error: *** libmcrypt was not found

But I was able to install libmcrypt from an rpm packages successfully. Any suggestions? Also, I cannot use up2date as it requires an active paid account from Red Hat and since the staff has changed rather rapidly in the last year where I work, no one knows if there even was any support accounts.

share|improve this question
RHEL4 was EOL'ed on 29th February 2012 ... perhaps its time to upgrade. See – Ben Lessani - Sonassi Sep 19 '12 at 15:43
Looks like you're trying to install packages built for Fedora 18. That's not going to work for a large variety of reasons. – Charles Sep 19 '12 at 17:02
I'm aware that RHEL4 is no longer supported, but this is a critical server that needs mcrypt yesterday and they won't be willing to risk an upgrade – Chris Sep 19 '12 at 19:20
up vote 3 down vote accepted

You are missing glibc: is needed by php-mcrypt-5.4.7-2.fc18.i686

which to my knowledge you basically cannot update unless you upgrade RHEL. Our systems were running RHEL5 for the longest time and we had the same issue with installing software, upgrade or basically enter dependency hell. Try and find a package for this software from back in the rhel4 days?

share|improve this answer
This is true. The RPM provided wasn't meant for that RHEL system and cannot be installed. GLIBC 2.4 change needs totally new RHEL. – anttiR Sep 20 '12 at 5:42

There's php-mcrypt package at least in rhel5 extras. If you find a RHEL4 repository with php-mcrypt and install it to yum it'll take care of it's dependencies.

yum search php-mcrypt

share|improve this answer
yum doesn't exist on this server, from what I understand it wasn't until RH5 that they introduced yum, which is why I didn't just go that route. – Chris Sep 19 '12 at 19:19
Seems I was wrong. It is possible to use Centos yum with RHEL4. There's some discussion at… – anttiR Sep 20 '12 at 5:41

To compile something with libmcrypt you'll need libmcrypt-devel not libmcrypt. libmcrypt is just a .so shared library, while -devel includes the header files needed for compilation.

Same with other dependencies. Check out also config.log about the program being compiled. It's usually several pages from the bottom.

share|improve this answer

Your Answer


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.