从源代码安装包时 yum 检查错误

yum check error when install package from source code

我的服务器是 centos 6.10,我从源代码安装了 curl、libssh2、openssl、c-ares、python-urlgrabber,所有这些包 运行 没有任何问题,但是当我使用 camand yum 检查,我收到错误信息: gnupg2-2.0.14-9.el6_10.x86_64 缺少 libcurl.so.4() 的要求 rpm-4.8.0-59.el6.x86_64 缺少 curl 要求 yum-3.2.29-81.el6.centos.0.1.noarch 缺少 python-urlgrabber >= ('0', '3.9.1', '10')

我已经尝试用这些 lib 包更新 ldconfig,似乎找不到这些包,但是所有这些命令 运行 都没有问题,例如,如果真的缺少 python-urlgrabber , yum check 和 yum update 不会 运行,如果缺少我从软件包安装的 curl,rpm 命令也不会 运行,如何解决这个问题?

[root@srv ~]# ldd /usr/lib64/python2.6/site-packages/pycurl.so
    linux-vdso.so.1 =>  (0x00007ffef3392000)
    libcrypto.so.1.1 => /usr/local/openssl/lib/libcrypto.so.1.1 (0x00007f59ee73a000)
    libssl.so.1.1 => /usr/local/openssl/lib/libssl.so.1.1 (0x00007f59ee4a7000)
    libcurl.so.4 => /usr/local/curl/lib/libcurl.so.4 (0x00007f59ee21b000)
    libpython2.6.so.1.0 => /usr/lib64/libpython2.6.so.1.0 (0x00007f59ede75000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f59edc58000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f59ed8c3000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f59ed6bf000)
    libcares.so.2 => /usr/local/ares/lib/libcares.so.2 (0x00007f59ed4ad000)
    libnghttp2.so.14 => /usr/local/nghttp2/lib/libnghttp2.so.14 (0x00007f59ed287000)
    libidn2.so.0 => /usr/local/libidn2/lib/libidn2.so.0 (0x00007f59ed038000)
    libssh2.so.1 => /usr/local/libssh2/lib/libssh2.so.1 (0x00007f59ecdfa000)
    libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f59ecbb6000)
    libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f59ec8cf000)
    libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f59ec6a2000)
    libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f59ec49e000)
    libldap-2.4.so.2 => /usr/lib64/libldap-2.4.so.2 (0x00007f59ec24d000)
    libbrotlidec.so.1 => /usr/local/brotli/lib/libbrotlidec.so.1 (0x00007f59ec02b000)
    libz.so.1 => /lib64/libz.so.1 (0x00007f59ebe15000)
    librt.so.1 => /lib64/librt.so.1 (0x00007f59ebc0d000)
    libutil.so.1 => /lib64/libutil.so.1 (0x00007f59eba09000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f59eb785000)
    /lib64/ld-linux-x86-64.so.2 (0x000055cca51d7000)
    libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f59eb579000)
    libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f59eb376000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f59eb15c000)
    liblber-2.4.so.2 => /usr/lib64/liblber-2.4.so.2 (0x00007f59eaf4c000)
    libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00007f59ead32000)
    libssl3.so => /usr/lib64/libssl3.so (0x00007f59eaadf000)
    libsmime3.so => /usr/lib64/libsmime3.so (0x00007f59ea8b1000)
    libnss3.so => /usr/lib64/libnss3.so (0x00007f59ea569000)
    libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007f59ea33a000)
    libplds4.so => /lib64/libplds4.so (0x00007f59ea135000)
    libplc4.so => /lib64/libplc4.so (0x00007f59e9f30000)
    libnspr4.so => /lib64/libnspr4.so (0x00007f59e9cf1000)
    libbrotlicommon.so.1 => /usr/local/brotli/lib/libbrotlicommon.so.1 (0x00007f59e9ad0000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f59e98b1000)
    libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f59e9679000)
    libfreebl3.so => /usr/lib64/libfreebl3.so (0x00007f59e9476000)

    rpm command run ok:
    [root@srv rpm]# rpm -qa | grep kernel
    kernel-firmware-2.6.32-754.23.1.el6.noarch
    dracut-kernel-004-411.el6.noarch

    yum command run ok:
    [root@srv rpm]# yum check
    Loaded plugins: fastestmirror
    gnupg2-2.0.14-9.el6_10.x86_64 has missing requires of libcurl.so.4()(64bit)
    rpm-4.8.0-59.el6.x86_64 has missing requires of curl
    yum-3.2.29-81.el6.centos.0.1.noarch has missing requires of python-urlgrabber >= ('0', '3.9.1', '10')
    Error: check all

    [root@srv rpm]# curl --version
    curl 7.66.0 (x86_64-redhat-linux-gnu) libcurl/7.66.0 OpenSSL/1.1.1d zlib/1.2.3 brotli/1.0.7 c-ares/1.15.0 libidn2/2.2.0 libssh2/1.9.0 nghttp2/1.39.2
    Release-Date: 2019-09-11

    [root@srv rpm]# cat /etc/ld.so.conf.d/curl.conf
    /usr/local/curl/lib

rpm 因此 yum 只能使用 rpm 文件解决依赖关系。您似乎已经手动安装了 curl(使用 make install 或类似的东西)。

如果你想让 rpm 级别的依赖项工作,你需要安装 curl-4rpm