yumのimporting one of the Phython modulesにハマる

$ yum
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, Jun 18 2012, 14:18:47) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)]

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

$ python
Python 2.6.6 (r266:84292, Jun 18 2012, 14:18:47) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pycurl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/lib64/python2.6/site-packages/pycurl.so: undefined symbol: CRYPTO_set_locking_callback

よく見ると...

$ ldd /usr/lib64/python2.6/site-packages/pycurl.so
        linux-vdso.so.1 =>  (0x00007fffa80b4000)
        libcurl.so.4 => /usr/local/lib/libcurl.so.4 (0x00007fb148e9b000)
        libpython2.6.so.1.0 => /usr/lib64/libpython2.6.so.1.0 (0x00007fb148ad0000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb1488b3000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fb148521000)
        libz.so.1 => /lib64/libz.so.1 (0x00007fb14830a000)
        librt.so.1 => /lib64/librt.so.1 (0x00007fb148102000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fb147efe000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00007fb147cfa000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fb147a76000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003970800000)

libcurlが,/usr/localの怪しいところを見に行っている...

$ ls -l /usr/bin/curl 
-rwxr-xr-x 1 root root 133688 Jun 26  2013 /usr/bin/curl
$ ls -l /usr/local/bin/curl
-rwxr-xr-x 1 root root 166857 Dec 20 12:20 /usr/local/bin/curl
$ ldconfig -p|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
$ echo $LD_LIBRARY_PATH
/usr/local/lib

これだ...ldconfigでは/usr/lib64を見てるのにcurlが丁寧に環境変数を尊重しているっぽいです.

$ export LD_LIBRARY_PATH=
$ yum
Loaded plugins: fastestmirror, security
You need to give some command
Usage: yum [options] COMMAND

List of Commands:

check          Check for problems in the rpmdb
check-update   Check for available package updates
clean          Remove cached data
deplist        List a package's dependencies

イケました.