欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

pycurl.so: undefined symbol 解决方法

程序员文章站 2022-05-26 23:40:58
...

使用yum install 包时出现的undefined symbol问题:

yum install libatomic1 -y
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, Aug  4 2017, 00:39:18) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]

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

看静态链接库的情况:

# ldd /usr/lib64/python2.7/site-packages/pycurl.so 
        linux-vdso.so.1 =>  (0x00007ffd487c1000)
        libcurl.so.4 => /usr/local/lib/libcurl.so.4 (0x00007f89c19e1000)(此处的问题)
        libpython2.7.so.1.0 => /lib64/libpython2.7.so.1.0 (0x00007f89c1615000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f89c13f9000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f89c102c000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f89c0e16000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f89c0c12000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00007f89c0a0f000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f89c070d000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f89c1e44000)

libcurl.so.4在哪里:

locate libcurl.so.4
/opt/soft/curl-7.46.0/lib/.libs/libcurl.so.4
/opt/soft/curl-7.46.0/lib/.libs/libcurl.so.4.4.0
/usr/lib64/libcurl.so.4
/usr/lib64/libcurl.so.4.3.0
/usr/local/lib/libcurl.so.4
/usr/local/lib/libcurl.so.4.4.0

# 删掉有问题的lib库
rm /usr/local/lib/libcurl.so.4

# 重新link
ln -s /usr/lib64/libcurl.so.4.3.0 /usr/lib/libcurl.so.4
相关标签: Linux