Solve the "QString: arg: Argument missing: Unable to parse the symbol in SSLv2_client_method" error reported by the Qt program in Linux, sslprotocolsslv2

Source: Internet
Author: User
Tags openssl download openssl library

Solve the "QString: arg: Argument missing: Unable to parse the symbol in SSLv2_client_method" error reported by the Qt program in Linux, sslprotocolsslv2

In Linux, the Qt Program Reports "QString: arg: Argument missing: Unable to parse the symbol in SSLv2_client_method ".

 

If you develop a Qt application in Linux, the program reports the following error:

QString: arg: Argument missing: Unable to parse the 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": crypto, (/lib/x86_64-linux-gnu/libcrypto. so.1.0.0: undefined symbol: SSLv2_client_method) in sslv2_method)

Qt. network. ssl: QSslSocket: cannot resolve SSLv2_client_method

QString: arg: Argument missing: Unable to parse the 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": crypto, (/lib/x86_64-linux-gnu/libcrypto. so.1.0.0: undefined symbol: SSLv2_server_method) in SSLv2_server_method)

Qt. network. ssl: QSslSocket: cannot resolve SSLv2_server_method

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

This error was reported when the QString: arg () function was used. After checking the related posts and materials, we found the OpenSSL library in the Ubuntu operating system, SSLv2 is not compiled. It is probably because of security.

After learning about the problem, let's look for a solution. Because we do not intend to modify the core OpenSSL library of Ubuntu, but do not want to report such an error, we will not put it on/usr/lib while building OpenSSL, put it in the lib directory of Qt to avoid such errors. The following is a specific solution. You don't have to worry about it and will be able to solve it soon.
1. Download the source code of the OpenSSL library from the network. The address is:

Http://openssl.org


Download the latest OpenSSL 1.0.2b.

2. Press Ctrl + Alt + T to open the terminal and locate the OpenSSL download location. The command here is:

Cd ~ /Develop/openssl-1.0.2b

3. Configure OpenSSL to generate a Dynamic Link Library:

./Configenable-shared

4. Execute build

Make

5. Copy the generated. so file and its link 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 it in the following position:

~ /Develop/Qt5.5.0Beta/5.5/gcc_64/lib

When you run the related program and encounter the QString: args () function, these errors are not reported.

The above purple-striped text cannot be solved for the time being, because the function symbols such as res_nclose are missing in the libresolv. so.2 file of Linux core library glibc. This may also be the reason why the Ubuntu team did not compile this function symbol. The solution is to find the dynamic link library libresolv. so.2 In the glibc library of all Linux releases, and then put it in a similar

~ /Develop/Qt5.5.0Beta/5.5/gcc_64/lib

Such a directory, but as of my blog writing, I still did not find a suitable dynamic link library.

Related Article

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.