Troubleshooting Linux under QT program "Qstring::arg:argument missing: Unable to parse symbols in Sslv2_client_method" error

Source: Internet
Author: User
Tags openssl library

Troubleshooting Linux under QT program "Qstring::arg:argument missing: Unable to parse symbols in Sslv2_client_method" error

In the Linux development QT application, the program will report such errors:

Qstring::arg:argument Missing: Unable to resolve symbol "Sslv2_client_method" in Sslv2_client_method: SSL, (/lib/x86_64-linux-gnu/ libssl.so.1.0.0:undefined Symbol:sslv2_client_method)

Qstring::arg:argument missing: Unable to parse the symbol "Sslv2_client_method" in Sslv2_client_method: Crypto, (/lib/x86_64-linux-gnu/ libcrypto.so.1.0.0:undefined Symbol:sslv2_client_method)

Qt.network.ssl:QSslSocket:cannot Resolve Sslv2_client_method

Qstring::arg:argument Missing: Unable to resolve symbol "Sslv2_server_method" in Sslv2_server_method: SSL, (/lib/x86_64-linux-gnu/ libssl.so.1.0.0:undefined Symbol:sslv2_server_method)

Qstring::arg:argument missing: Unable to parse the symbol "Sslv2_server_method" in Sslv2_server_method: Crypto, (/lib/x86_64-linux-gnu/ libcrypto.so.1.0.0:undefined Symbol:sslv2_server_method)

Qt.network.ssl:QSslSocket:cannot Resolve Sslv2_server_method

Qstring::arg:argument missing: Unable to parse the symbol "Res_nclose" in Res_nclose: Libresolv.so.2, (/lib/x86_64-linux-gnu/ libresolv.so.2:undefined symbol:res_nclose)

This is in the use of the Qstring::arg () function when the error reported, review the relevant posts and materials, found in Ubuntu this operating system with the OpenSSL library, not compiled SSLV2 this kind of function, is estimated to be security reasons.

Knowing where the problem is, let's look for a solution. Because we have no intention of modifying Ubuntu's core OpenSSL library, but want to not report such a mistake, so we build OpenSSL at the same time, do not put it on the/usr/lib, but placed in the Qt Lib directory, so as to avoid such errors. Here is a concrete solution, don't worry, it will be solved soon.
1. Download the source code of the OpenSSL library from the network. The address is:

http://openssl.org


We download the latest OpenSSL 1.0.2b.

2, Ctrl +alt + T, open the terminal, locate the downloaded OpenSSL location, my command here is:

Cd~/develop/openssl-1.0.2b

3. Configure OpenSSL to generate a dynamic link library:

./configenable-shared

4, the implementation of construction

Make

5. Copy the resulting. So file and its links to the corresponding Qtsdk/lib folder, specifically these files:

Libcrypto.so

libcrypto.so.1.0.0

Libssl.so

libssl.so.1.0.0

Here I put in the position is:

~/develop/qt5.5.0beta/5.5/gcc_64/lib

Run the related program again, when encountering the Qstring::args () function, do not report these errors.

Above the purple shading of the text, I have no way to solve the reason is that the Linux core library glibc libresolv.so.2 files in the absence of res_nclose such a function symbol. Maybe it's the Ubuntu team. This function symbol is not compiled, and the workaround is to find the dynamic link Library of libresolv.so.2 in all distributions of Linux glibc Library, and then put it in similar

~/develop/qt5.5.0beta/5.5/gcc_64/lib

Such a directory, but as far as I write a blog, I still did not find a suitable dynamic link library.

Troubleshooting Linux under QT program "Qstring::arg:argument missing: Unable to parse symbols in Sslv2_client_method" error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.