CentOS yum 失败并显示 libcurl.so.4 错误提示 'undefined symbol: libssh2_agent_disconnect'

CentOS yum fails with libcurl.so.4 error saying 'undefined symbol: libssh2_agent_disconnect'

我正在使用 CentOS 7 并尝试使用 yum 但它失败了。 早些时候,我安装了curl和其他东西,但看起来libcurl出错了。

每当我尝试时:

# yum

结果是:

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   /lib64/libcurl.so.4: undefined symbol: libssh2_agent_disconnect

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.5 (default, Apr  9 2019, 14:30:50) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq

我试过删除库,但没有用。 谁能找到解决方案?

这个问题是一个象征性的 link 问题。

以下命令解决了它。

ldd -r /usr/lib64/libcurl.so.4

rm /usr/local/lib/libssh2.so.1

我查看了 libcurl 是否有损坏的符号 link,我找到了一个并将其删除。