Crypto_set_locking_callback () is available in all versions of Ssleay and openssl.undefined symbol:crypto_set_locking_cal The correct workaround for Lback is to specify the path to SSL at compile time.
Compile LNMP new environment material process, source code compiled after installing curl, found a lot of calls to the Curl library file where the error.
For example, inadvertently executed the Yum installation command, found the following error, pycurl.so call error.
Error content:
/usr/lib64/python2.6/site-packages/pycurl.so:undefined Symbol:crypto_set_locking_callback
View pycurl.so files with the LDD command:
ldd /usr/lib64/python2.6/site-packages/pycurl.so linux-vdso.so.1 => (0x00007fff6b7c5000) /$ lib/libonion.so => /lib64/libonion.so (0x00007fb2ee6e8000) libcurl.so.4 => /usr/local/lib/libcurl.so.4 (0x00007fb2ee474000) libpython2.6.so.1.0 => /usr/lib64/libpython2.6.so.1.0 (0x00007fb2ee0bb000) libpthread.so.0 => / lib64/libpthread.so.0 (0x00007fb2ede9e000) libc.so.6 => /lib64/libc.so.6 (0x00007fb2edb0a000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fb2ed905000) libssl.so.1.0.0 => /usr/local/lib64/libssl.so.1.0.0 (0x00007fb2ed6a1000) libcrypto.so.1.0.0 => /usr/local/lib64/libcrypto.so.1.0.0 (0x00007fb2ed2c4000) libz.so.1 => /usr/local/lib/libz.so.1 ( 0x00007fb2ed0ad000) librt.so.1 => /lib64/ librt.so.1 (0x00007fb2ecea5000) libutil.so.1 => /lib64/libutil.so.1 (0x00007fb2ecca2000) libm.so.6 => /lib64/libm.so.6 (0x00007fb2eca1d000) / lib64/ld-linux-x86-64.so.2 (0x00007fb2eea09000)
It can be known that the libcurl that pycurl.so relies on is pointing to our upgraded address.
about pycurl.so
Yum is essentially a Python script, and pycurl.so is a Python interface in Python that implements the Libcurl library in C, which is functionally similar to urllib and fast .
Home Address: Pycurl.io
Pycurl is a Python interface to Libcurl. Pycurl can used to fetch objects identified by a URL from a Python program, similar to the Urllib Python module. Pycurl is mature, very fast, and supports a lot of features.
It can be concluded that Yum downloads the RPM package via Pycurl to complete the download action, and Pycurl is a libcurl implementation in the Python language.
After the Libcurl changes, the Pycurl will also be affected accordingly.
Python 2.6.6 (r266:84292, Dec 7, 20:48:22) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on Linux2type "help", "copyright", "Credits" or "license" for more information.>>> import pycurl>>> pycurl.version ' libcurl/7.50.1 OPENSSL/1.0.1T zlib/1.2.8 '
The error shows that the undefined symbol crypto_set_locking_callback, undefined symbols.
Undefined description What is missing in Libcurl causes crypto_set_locking_callback to be found.
What is Crypto_set_locking_callback?
Crypto_set_locking_callback
Https://wiki.openssl.org/index.php/Manual:Threads (3)
Crypto_set_locking_callback () is available in all versions of Ssleay and OpenSSL.
Found missing crypto_set_locking_callback in Ssleay and OpenSSL , compiling libcurl commands before retrospectives, configure--with-ssl=path option is optional, we install OpenSSL in the/usr/local directory, and the Libcurl is not specified --with-ssl this parameter when compiling the installation.
Where to look for OpenSSL, PATH points to the SSL installation (default:/USR/LOCAL/SSL); When possible, set the PKG_CONFIG_PATH environment variable instead of using this option.
Libcurl can not find SSL related library file, so will error:undefined symbol crypto_set_locking_callback.
Find the problem, and then recompile Libcurl, the compilation process in configure when specified--with-ssl=/usr/local, after installation, re-execute yum, no longer error.
There are many articles on the web that provide a workaround to link the new file's library address to the original old file.
Connect the/usr/local/lib/libcurl.so.4 directly to the old Libcurl
Rm/usr/local/lib/libcurl.so.4;ln-s/usr/lib64/libcurl.so.4.1.1/usr/local/lib/libcurl.so.4
This method does not really solve our problem, just the equivalent of rolling back the Libcurl file, and did not meet our intention to update libcurl.
The correct solution is to identify the cause of the error, such as the lcrypto_set_locking_callback definition is not found this time , in the final analysis, because we did not specify the path of the SSL file when compiling Libcurl, and then, To resolve the problem, recompile the Libcurl, plus the SSL parameters.
This article from "Ops said: from rookie to veteran" blog, please be sure to keep this source http://liuqunying.blog.51cto.com/3984207/1835717
Source Update Curl Report crypto_set_locking_callback error