如何告诉Qt使用不同的OpenSSL [英] How to tell Qt to use different OpenSSL

查看:407
本文介绍了如何告诉Qt使用不同的OpenSSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Qt 4:4.6.3-4 + squeeze1和openssl 0.9.8o-4squeeze14的linux openssl.0.9.8和openssl 1.0之间的通信存在问题,如下所述:

I have linux with Qt 4:4.6.3-4+squeeze1 and openssl 0.9.8o-4squeeze14 There is problem with communication between openssl.0.9.8 and openssl 1.0 described here:

http://marc.info/?l=openssl -dev& m = 136760073921954& w = 2

我已经将openssl-1.0.2j构建到/home/openssl,但是无法使用该库进行Qt处理. SSL是动态链接的,因此ldd my_program不会显示libssl. 我尝试过

I have built openssl-1.0.2j to /home/openssl but I can't make Qt using this library. SSL is dynamically linked so ldd my_program doesn't show libssl. I have tried

LD_LIBRARY_PATH=/home/openssl ./my_program

但是它不起作用,我可以通过命令查看:

But it doesnt work, I can see with command:

$ lsof -p 16126|grep -i ssl
ccbox-ccd 16126 root  mem    REG       80,5   310296  8389597 /usr/lib/i686/cmov/libssl.so.0.9.8
$ lsof -p 16126|grep -i crypt
ccbox-ccd 16126 root  mem    REG       80,5   469632 29365978 /usr/lib/libgcrypt.so.11.5.3
ccbox-ccd 16126 root  mem    REG       80,5   143180 29375951 /usr/lib/libk5crypto.so.3.1
ccbox-ccd 16126 root  mem    REG       80,1    38360  1104731 /lib/i686/cmov/libcrypt-2.11.3.so
ccbox-ccd 16126 root  mem    REG       80,5  1393308  8389598 /usr/lib/i686/cmov/libcrypto.so.0.9.8

始终使用0.9.8进行编辑,/etc/ld.so.conf也无济于事

that it is always using 0.9.8 also editing /etc/ld.so.conf doesn't help

如何将Qt指向永不使用openssl版本

How to point Qt to use never version of openssl

最好的问候 马雷克

推荐答案

最好重新构建应用程序(使用qmake/make),并确保通过运行使用正确的openssl库

it's better if you can rebuild your application (using qmake/make), and make sure that you use the right openssl libs by running

export LD_LIBRARY_PATH=Absolute_Path/openssl/lib

之前.

此外,即使您的应用程序是在不同位置使用openssl库构建的,也可以在运行应用程序之前使用相同的命令.但是,您需要确保在新位置上的openssl库的名称与您的应用程序根据ldd输出所需要的名称相匹配.

Also, you can use the same command before running your app, even if your app was build using openssl libs at different location. However, you need to make sure that the names of the openssl libs at the new location match the ones that your application needed as per your ldd output.

这篇关于如何告诉Qt使用不同的OpenSSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆