centos7 安装 qt5.14.2 以及 openssl 问题

qt.network.ssl: QSslSocket: cannot resolve CRYPTO_num_locks
qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_id_callback
qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_locking_callback
qt.network.ssl: QSslSocket: cannot resolve ERR_free_strings
qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_cleanup
qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_init
qt.network.ssl: QSslSocket: cannot resolve sk_new_null
qt.network.ssl: QSslSocket: cannot resolve sk_push
qt.network.ssl: QSslSocket: cannot resolve sk_free
qt.network.ssl: QSslSocket: cannot resolve sk_num
qt.network.ssl: QSslSocket: cannot resolve sk_pop_free
qt.network.ssl: QSslSocket: cannot resolve sk_value
qt.network.ssl: QSslSocket: cannot resolve SSL_library_init
qt.network.ssl: QSslSocket: cannot resolve SSL_load_error_strings
qt.network.ssl: QSslSocket: cannot resolve SSL_get_ex_new_index
qt.network.ssl: QSslSocket: cannot resolve SSLv23_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv23_server_method
qt.network.ssl: QSslSocket: cannot resolve X509_STORE_CTX_get_chain
qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
qt.network.ssl: QSslSocket: cannot resolve SSLeay
qt.network.ssl: QSslSocket: cannot resolve SSLeay_version
qt.network.ssl: QSslSocket: cannot call unresolved function SSLeay
qt.network.ssl: Incompatible version of OpenSSL
主要是 openssl 版本不兼容系统自带的1.1.1d 的问题 下载地址

/source/old/1.1.1/index.htmlhttps://www.openssl.org/source/old/1.1.1/   tar zxvf openssl-1.1.1k.tar.gz 
   cd openssl-1.1.1k/
   ls
   ./config enable-shared
   make depend
   make
  make test
当make test  的时候会有一个错误

openssl Can't locate Test/Harness.pm in @INC

以下是解决方案 创建一个.sh文件 sudo 运行 会安装相关的应用

[email protected]: Can't locate Test/Harness.pm in @INC on CentOS 8 · Issue #20079 · Homebrew/linuxbrew-core · GitHub

#!/bin/sh

set -ex

yum -y --nogpgcheck install which
yum -y groupinstall 'Development Tools'
yum -y install curl \
               file \
               git \
               perl-CPAN \
               perl-Module-Load-Conditional \
               perl-core \
               gnupg2
yum clean all

完后在make test 就不会报错了,(但还是有No external tests in this configuration)这些不用管

直接

sudo make install

centos7 安装 qt5.14.2 以及 openssl 问题_第1张图片

 把下面的 .so 文件拷贝到 qt对应的 gcc_64/lib 目录下

然后在编译运行

你可能感兴趣的:(ssl,服务器,https)