[Python] Conflicting OPENSSL versions under Linux

Discussão em 'Python' iniciado por Stack, Junho 11, 2025.

  1. Stack

    Stack Membro Participativo

    I'm building a project linking both with QtNetwork (Qt6) and Python library (3.8).

    At runtime, I get the error:

    my_prg_bin: symbol lookup error: /lib64/libk5crypto.so.3: undefined symbol: EVP_KDF_ctrl, version OPENSSL_1_1_1b


    After investigating, I could finally isolate the problem and found the root cause:

    • ldd libQt6Network.so.6 shows it links to libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x000014fdf898a000)
    • ldd my_prg_bin shows it links to libcrypto.so.1.1 => /home/me/Python385/lin64/lib/libcrypto.so.1.1 (0x00001468b4898000)

    If I do objdump -TC /lib64/libcrypto.so.1.1 | grep EVP_KDF, I see some OPENSSL_1_1_1b entries. If I do objdump -TC /home/me/Python385/lin64/lib/libcrypto.so.1.1 | grep EVP_KDF, it's empty. Those two files are definitely not the same.

    My program does not spcifically request to link with libcrypto.so.1.1 at runtime, but I see that if I remove target_link_libraries( my_prg_bin /home/me/Python385/lin64/lib/python3.8.so ) from its CMakeLists.txt, it does not link to /home/me/Python385/lin64/lib/libcrypto.so.1.1 any more and the problem is gone.

    libQt6Network was compiled by my system root. Python was dowloaded by miniconda. Is there a way to fix this conflicting SSL versions?

    I also see that, if I remove the /home/me/Python385/lin64/lib/libcrypto.so.1.1 fil from disk:

    • ldd my_prg_bin now shows it links to libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x000014baaab6e000)
    • No more crash occurs
    • /home/me/Python385/lin64/bin/python and my program apparently runs fine (my program is able to run Python scripts without problem)

    Is this a "safe" workaround?

    Continue reading...

Compartilhe esta Página