Yum check update error "pycurl.so: undefined symbol: CRYPTO_set_locking_callback"

Solution Unverified - Updated -

Environment

  • Red Hat Enterprise Linux 6.4

Issue

  • When I run yum, following error occurs:
[root@host tmp]# yum check update
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   /usr/lib64/python2.6/site-packages/pycurl.so: undefined symbol: CRYPTO_set_locking_callback

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.6.6 (r266:84292, Sep  4 2013, 07:46:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]

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

Resolution

  • Check and fix the curl library path or remove 3rd party curl library.

Root Cause

  • 3rd party curl library has been installed.
# ldconfig -p -N -X | grep curl
    libcurl.so.4 (libc6,x86-64) => /usr/lib/libcurl.so.4
    libcurl.so.4 (libc6,x86-64) => /usr/lib64/libcurl.so.4
    libcurl.so (libc6,x86-64) => /usr/lib/libcurl.so

Diagnostic Steps

  • Do an strace on the yum command, you'll probably see it pointing to the problem package or file, like:
open("/usr/lib/libcurl.so.4", O_RDONLY) = 9
  • Output of ldd command in normal system.
# ldd /usr/lib64/python2.6/site-packages/pycurl.so
    linux-vdso.so.1 =>  (0x00007fff9cb7f000)
    libcurl.so.4 => /usr/lib64/libcurl.so.4 (0x00007fc35da43000)  <<--- proper path
    libpython2.6.so.1.0 => /usr/lib64/libpython2.6.so.1.0 (0x00007fc35d69d000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc35d47f000)
    libc.so.6 => /lib64/libc.so.6 (0x00007fc35d0eb000)
    libidn.so.11 => /lib64/libidn.so.11 (0x00007fc35ceb9000)
    libldap-2.4.so.2 => /lib64/libldap-2.4.so.2 (0x00007fc35cc68000)
    librt.so.1 => /lib64/librt.so.1 (0x00007fc35ca60000)
    libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007fc35c81c000)
    libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007fc35c535000)
    libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007fc35c309000)
    libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007fc35c105000)
    libz.so.1 => /lib64/libz.so.1 (0x00007fc35beee000)
    libssl3.so => /usr/lib64/libssl3.so (0x00007fc35bcaf000)
    libsmime3.so => /usr/lib64/libsmime3.so (0x00007fc35ba83000)
    libnss3.so => /usr/lib64/libnss3.so (0x00007fc35b743000)
    libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007fc35b517000)
    libplds4.so => /lib64/libplds4.so (0x00007fc35b313000)
    libplc4.so => /lib64/libplc4.so (0x00007fc35b10d000)
    libnspr4.so => /lib64/libnspr4.so (0x00007fc35aecf000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007fc35accb000)
    libssh2.so.1 => /usr/lib64/libssh2.so.1 (0x00007fc35aaa2000)
    libutil.so.1 => /lib64/libutil.so.1 (0x00007fc35a89f000)
    libm.so.6 => /lib64/libm.so.6 (0x00007fc35a61b000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003369800000)
    liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007fc35a40b000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fc35a1f1000)
    libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00007fc359fd7000)
    libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007fc359dcb000)
    libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007fc359bc8000)
    libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007fc35995b000)
    libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007fc359578000)
    libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fc359341000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fc359121000)
    libfreebl3.so => /lib64/libfreebl3.so (0x00007fc358ea8000)
  • Output of ldd command in problematic system.
# ldd /usr/lib64/python2.6/site-packages/pycurl.so
    linux-vdso.so.1 =>  (0x00007fff973ff000)
    libcurl.so.4 => /usr/lib/libcurl.so.4 (0x00007fe0691d1000) <<<----- might be changed.
    libpython2.6.so.1.0 => /usr/lib64/libpython2.6.so.1.0 (0x00007f110b8af000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc35d47f000)
    libc.so.6 => /lib64/libc.so.6 (0x00007fc35d0eb000)
    librt.so.1 => /lib64/librt.so.1 (0x00007fc35ca60000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007fc35accb000)
    libutil.so.1 => /lib64/libutil.so.1 (0x00007fc35a89f000)
    libm.so.6 => /lib64/libm.so.6 (0x00007fc35a61b000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003369800000)

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

7 Comments

Sorry Posted here by mistake.

root@taxqn1psoradb03:~ # ldconfig -p -N -X | grep curl libwsman_curl_client_transport.so.1 (libc6,x86-64) => /usr/lib64/libwsman_curl_client_transport.so.1 libcurl.so.4 (libc6,x86-64) => /usr/lib64/libcurl.so.4 root@taxqn1psoradb03:~ #

root@taxqn1psoradb03:~ # ldd /usr/lib64/python2.6/site-packages/pycurl.so linux-vdso.so.1 => (0x00007fff4a3ff000) libcurl.so.4 => /usr/lib64/libcurl.so.4 (0x00007f469a9ad000) libpython2.6.so.1.0 => /usr/lib64/libpython2.6.so.1.0 (0x00007f469a607000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f469a3e9000) libc.so.6 => /lib64/libc.so.6 (0x00007f469a055000) libidn.so.11 => /lib64/libidn.so.11 (0x00007f4699e23000) libldap-2.4.so.2 => /lib64/libldap-2.4.so.2 (0x00007f4699bd5000) librt.so.1 => /lib64/librt.so.1 (0x00007f46999cd000) libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f4699789000) libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f46994a2000) libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f4699276000) libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f4699072000) libz.so.1 => /lib64/libz.so.1 (0x00007f4698e5b000) libssl3.so => /usr/lib64/libssl3.so (0x00007f4698c1d000) libsmime3.so => /usr/lib64/libsmime3.so (0x00007f46989f1000) libnss3.so => /usr/lib64/libnss3.so (0x00007f46986b2000) libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007f4698486000) libplds4.so => /lib64/libplds4.so (0x00007f4698282000) libplc4.so => /lib64/libplc4.so (0x00007f469807c000) libnspr4.so => /lib64/libnspr4.so (0x00007f4697e3f000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f4697c3b000) libssh2.so.1 => /usr/lib64/libssh2.so.1 (0x00007f4697a12000) libutil.so.1 => /lib64/libutil.so.1 (0x00007f469780f000) libm.so.6 => /lib64/libm.so.6 (0x00007f469758b000) /lib64/ld-linux-x86-64.so.2 (0x00000039d2000000) liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007f469737b000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f4697161000) libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00007f4696f47000) libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f4696d3b000) libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f4696b38000) libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f46968cb000) libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f46964eb000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f46962b4000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f4696094000) libfreebl3.so => /lib64/libfreebl3.so (0x00007f4695e1d000) root@taxqn1psoradb03:~ #

Please help me correct the wrong library path

hi

We tried, same issue

yum install subscription-manager-migration subscription-manager-migration-data There was a problem importing one of the Python modules required to run yum. The error leading to this problem was:

/usr/lib64/python2.6/site-packages/pycurl.so: undefined symbol: CRYPTO_set_locking_callback

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.6.6 (r266:84292, Nov 21 2013, 10:50:32) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]

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

Also be sure to check the LD Cache Configuration.

I.e., while the vendor may not replace the /usr/lib[64]/libcurl.so* et al., they can interject an alternative source for it via files in /etc/ld.so.conf.d/*.conf files. Run "ldconfig" after removing the offending file so those directories are not scanned.

I run into this regularly with poorly behaving ISV software that replaces the system-wide libcurl, instead of exporting LD_LIBRARY_PATH under the executing user(s).