在 Red Hat 4 上安装 PHP mcrypt

在 Red Hat 4 上安装 PHP mcrypt

我在 Red Hat 4 服务器上安装 mcrypt for PHP 时遇到了很大困难。我下载了 rpm,但它告诉我:

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
    libc.so.6(GLIBC_2.4) is needed by php-mcrypt-5.4.7-2.fc18.i686
    libltdl.so.7 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

因此,当我尝试安装其中一个软件包时,它们还需要另外 8 个软件包。所以我在这里陷入了依赖地狱。现在,如果我尝试从源代码编译 mcrypt,我会得到以下结果:

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

但是我能够成功地从 rpm 包安装 libmcrypt。有什么建议吗?另外,我无法使用 up2date,因为它需要 Red Hat 的有效付费帐户,而且由于我工作的地方去年员工变动相当快,所以没人知道是否有任何支持帐户。

答案1

您缺少 glibc:

libc.so.6(GLIBC_2.4) is needed by php-mcrypt-5.4.7-2.fc18.i686

据我所知,除非升级 RHEL,否则基本上无法更新。我们的系统运行 RHEL5 的时间最长,我们在安装软件、升级或基本上进入依赖地狱时遇到了同样的问题。尝试从 rhel4 时代开始寻找此软件的软件包?

答案2

至少在 rhel5 extras 中有 php-mcrypt 包。如果您找到带有 php-mcrypt 的 RHEL4 存储库并将其安装到 yum,它将处理其依赖项。

yum 搜索 php-mcrypt

答案3

要使用 libmcrypt 编译某些东西,您需要 libmcrypt-devel 而不是 libmcrypt。libmcrypt 只是一个 .so 共享库,而 -devel 包含编译所需的头文件。

与其他依赖项相同。还请查看有关正在编译的程序的 config.log。它通常位于底部的几页。

相关内容