/sbin/service httpd 重启

/sbin/service httpd 重启

我有一个 Redhat 服务器,它无法正确解析依赖关系。

我想通过 yum“yum install httpd”安装 httpd,并且它可以正确安装,但是当我启动 httpd 时出现以下错误:

/sbin/service httpd 重启

Stopping httpd:                                            [FAILED]
Starting httpd: /usr/sbin/httpd: error while loading shared libraries: libaprutil-1.so.0: cannot open shared object file: No such file or directory
                                                           [FAILED]

它缺少 apr-util 包的依赖项。

奇怪的是,安装了 i386 包,而不是 x86_64 包。有人能解释一下为什么依赖关系可能无法正确解析吗?

ldd /usr/sbin/httpd
    libm.so.6 => /lib64/libm.so.6 (0x00002b02370db000)
    libpcre.so.0 => /lib64/libpcre.so.0 (0x00002b023735e000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00002b023757a000)
    libaprutil-1.so.0 => not found
    libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002b0237793000)
    libldap-2.3.so.0 => /usr/lib64/libldap-2.3.so.0 (0x00002b02379cb000)
    liblber-2.3.so.0 => /usr/lib64/liblber-2.3.so.0 (0x00002b0237c06000)
    libdb-4.3.so => /lib64/libdb-4.3.so (0x00002b0237e14000)
    libexpat.so.0 => /lib64/libexpat.so.0 (0x00002b0238109000)
    libapr-1.so.0 => not found
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b023832c000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00002b0238547000)
    libc.so.6 => /lib64/libc.so.6 (0x00002b023874c000)
    libsepol.so.1 => /lib64/libsepol.so.1 (0x00002b0238aa3000)
    /lib64/ld-linux-x86-64.so.2 (0x00002b0236ebe000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00002b0238ce9000)
    libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00002b0238eff000)
    libssl.so.6 => /lib64/libssl.so.6 (0x00002b0239118000)
    libcrypto.so.6 => /lib64/libcrypto.so.6 (0x00002b0239364000)
    libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00002b02396b6000)
    libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00002b02398e4000)
    libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00002b0239b79000)
    libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00002b0239d7c000)
    libz.so.1 => /usr/lib64/libz.so.1 (0x00002b0239fa1000)
    libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00002b023a1b5000)
    libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00002b023a3be000)

但这是 i386 包

apr-util-1.2.7-11.el5.i386 : Apache Portable Runtime Utility library
Repo        : installed
Matched from:
Filename    : /usr/lib/libaprutil-1.so.0

更新:只是为了更新,我也在 cobbler 服务器上托管我自己的 repo,但它创建正确,我不确定这是否会导致 dep 解决出现任何问题?

更新 2:我已将调试级别更改为 10 以查看通过 yum 获得的内容,以下是输出。

我很确定应该有一个除无之外的条目,但不确定它应该是什么......

Resolving Dependencies
Running "preresolve" handler for "security" plugin
--> Running transaction check
---> Package httpd.x86_64 0:2.2.3-31.el5 set to be updated
Checking deps for httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('initscripts', 'GE', ('0', '8.36', None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libc.so.6(GLIBC_2.2.5)(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libpthread.so.0(GLIBC_2.2.5)(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('rtld(GNU_HASH)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('/etc/mime.types', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('/bin/bash', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('/bin/sh', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('textutils', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libm.so.6(GLIBC_2.2.5)(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('/sbin/chkconfig', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('/bin/rm', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('/bin/sh', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('/bin/mv', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('/usr/share/magic.mime', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('/usr/sbin/useradd', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('/usr/bin/find', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libcrypt.so.1(GLIBC_2.2.5)(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('sh-utils', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libc.so.6(GLIBC_2.3.4)(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libc.so.6(GLIBC_2.4)(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('gawk', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libc.so.6(GLIBC_2.3)(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('/bin/mktemp', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libc.so.6()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libpcre.so.0()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libdb-4.3.so()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libcrypto.so.6()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libexpat.so.0()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libselinux.so.1()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libm.so.6()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libssl.so.6()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('liblber-2.3.so.0()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libdl.so.2()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libaprutil-1.so.0()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libz.so.1()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libcrypt.so.1()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libapr-1.so.0()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libpthread.so.0()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
looking for ('libldap-2.3.so.0()(64bit)', None, (None, None, None)) as a requirement of httpd.x86_64 0-2.2.3-31.el5 - u
--> Finished Dependency Resolution
Dependency Process ending
Depsolve time: 0.811

答案1

我已经将此问题追溯到另一​​个软件包,该软件包宣称它可以解决 libapr 的依赖关系。因此,当 http 说它需要 libapr 时,这个编写糟糕的软件包说它可以满足库需求,因此被安装,而不是正确的 redhat libapr 软件包。我已经安排开发人员被殴打

答案2

我不确定为什么你无法获得正确的依赖项(如果不知道确切的 RHEL 版本,很难仔细检查信息)。在很多情况下,你可能需要或已经安装了同一软件包的 i386 和 x86_64 版本。还可能遇到怪癖或错误(尽管我很少见到),即特定于体系结构的软件包搞砸了依赖项。

您应该能够使用 来安装 x86_64 版本yum install apr-util-1.2.7-11.el5.x86_64

相关内容