1 使用yum安装任何软件都失败
使用yum安装软件,出现如下错误:
[root@localhost repositories]# yum install zlib-devel
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/usr/lib64/python2.7/site-packages/pycurl.so: undefined symbol: CRYPTO_num_locks
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, Oct 14 2020, 14:45:30)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
2 问题分析
查看链接库内容
[root@localhost repositories]# ldd /usr/lib64/python2.7/site-packages/pycurl.so
linux-vdso.so.1 => (0x00007ffee8f5d000)
libcurl.so.4 => /root/anaconda3/lib/libcurl.so.4 (0x00007f627dbc8000)
libpython2.7.so.1.0 => /lib64/libpython2.7.so.1.0 (0x00007f627d476000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f627d25a000)
libc.so.6 => /lib64/libc.so.6 (0x00007f627ce8c000)
libnghttp2.so.14 => /root/anaconda3/lib/./libnghttp2.so.14 (0x00007f627db90000)
libssh2.so.1 => /root/anaconda3/lib/./libssh2.so.1 (0x00007f627db4c000)
libssl.so.1.1 => /root/anaconda3/lib/./libssl.so.1.1 (0x00007f627dabb000)
libcrypto.so.1.1 => /root/ana

文章描述了一次在Linux系统中使用yum安装软件时遇到的问题,具体表现为Python模块导入失败,原因是conda环境中的libcurl.so.4动态链接库与系统Python版本不匹配。通过删除conda环境中的相关链接并创建正确指向系统库的新链接,最终解决了问题,成功安装了软件。
最低0.47元/天 解锁文章
4548

被折叠的 条评论
为什么被折叠?



