试图解决这个问题几个小时。我的Qt程序依赖于https连接但无法在Arch上启动它(在Debian和Ubuntu上运行正常)。
我将/ usr / lib添加到LD_LIBRARY_PATH lrwxrwxrwx 1 root root 13 2. lis 17.20 /usr/lib/libssl.so -> libssl.so.1.1
-r-xr-xr-x 1 root root 502024 25. kvě 18.54 /usr/lib/libssl.so.1.0.0
-rwxr-xr-x 1 root root 434176 2. lis 17.21 /usr/lib/libssl.so.1.1
-rwxr-xr-x 1 root root 359736 5. říj 22.49 /usr/lib/libssl3.so
节目输出
lrwxrwxrwx 1 root root 16 2. lis 17.20 /usr/lib/libcrypto.so -> libcrypto.so.1.1
-r-xr-xr-x 1 root root 2842880 25. kvě 18.54 /usr/lib/libcrypto.so.1.0.0
-rwxr-xr-x 1 root root 2594952 2. lis 17.21 /usr/lib/libcrypto.so.1.1
ls / usr / lib / libssl *
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
qDebug()<<"SSL version use for build: "<<QSslSocket::sslLibraryBuildVersionString();
qDebug()<<"SSL version use for run-time: "<<QSslSocket::sslLibraryVersionNumber();
qDebug()<<QCoreApplication::libraryPaths();
return 0;
}
ls -l / usr / lib / libcrypto *
SSL version use for build: "OpenSSL 1.0.1e-fips 11 Feb 2013"
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 SSLv2_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv3_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv23_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method
qt.network.ssl: QSslSocket: cannot resolve SSLv3_server_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: Incompatible version of OpenSSL
SSL version use for run-time: 0
("/home/michal/Qt/5.10.0/gcc_64/plugins", "/home/michal/Programming/build-Test-Desktop_Qt_5_10_0_GCC_64bit4-Vydu00e1nu00ed")
带测试代码的
app:layout_scrollFlags="enterAlways|enterAlwaysCollapsed"
输出
{{1}}
答案 0 :(得分:0)
我需要重新安装我的Ubuntu并安装openssl 1.0.x版本而不是1.1.x版本。除此之外,如果需要,您可以在构建项目之前运行Pixel
。
答案 1 :(得分:0)
我在使用Qt 5.10.1的ubuntu 16.04上遇到了同样的问题。我刚刚在我的机器上编译了Qt并安装了它,并且修复了ssl问题并开始使用opnessl 1.1.0。我已经配置了没有-openssl-linked标志的Qt。 考虑到编译可能需要相当长的时间,2-4小时
答案 2 :(得分:0)
将Ubuntu 16.x升级到18.04后,我遇到了同样的问题。原因似乎是新的Ubuntu上的默认libssl版本是1.1.0,而Qt的预构建二进制文件到现在为止期望是1.0.0(有关此问题的更多详细信息,请参见https://bugreports.qt.io/browse/QTBUG-68156)。
我的解决方法如下。
更改为Qt可执行文件的目录。
创建指向libssl 1.0.0版的符号链接
ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 libssl.so
确保您的LD_LIBRARY_PATH包含1)中的目录。
现在启动您的Qt可执行文件将选择正确的libssl版本。