Undefined symbol: OPENSSL_sk_num

I am trying to update Allow encryption with Certbot . It has stopped working, and I do not know why. Here is the error:

ImportError: /root/.local/share/letsencrypt/local/lib/python2.7/site-packages/cryptography/
hazmat/bindings/_openssl.so: undefined symbol: OPENSSL_sk_num

I have the latest version of OpenSSL installed

OpenSSL 1.1.0d  26 Jan 2017

I tried to debug this issue by doing the following. At first, I just tried adding OpenSSL imports to the python console. It worked perfectly, no errors. But when I try

. ~/.local/share/letsencrypt/bin/activate

Then >>> import OpenSSl I get the error message:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/OpenSSL/rand.py", line 12, in <module>
    from OpenSSL._util import (
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/OpenSSL/_util.py", line 6, in <module>
    from cryptography.hazmat.bindings.openssl.binding import Binding
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 14, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: /root/.local/share/letsencrypt/local/lib/python2.7/site-packages/cryptography/hazmat/bindings/_openssl.so: undefined symbol: OPENSSL_sk_num

I tried to remove the path /root/.local/share/letsencrypt/, and then tried running certbot-auto again. However, I get the same error. Anyone who run into this problem and know a solution? Please help me here. Several certificates need to be updated.

UPDATE:

, /lib/x86_64-linux-gnu libssl.so.1.0.0, OPENSSL_sk_num. libssl1.1 ( OPENSSL_sk_num), , OPENSSL_VERSION 1.0.1. , /usr- , ImportError: libssl.so.1.0.0: cannot open shared object file: No such file or directory. , letencrypt ?

. openssl 1.1.0c. letencrypt , . , . , letencrypt, -no-self-upgrade.

, , . openssl 1.1.0c :

./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)' make

libcrypto.so.1.1 libssl.so.1.1 /usr/lib/x86_64-linux-gnu

libcrypto libssl. /usr/lib/x86_64-linux-gnu, ln -s libssl.so.1.1 libssl ln -s libcrypto.so.1.1 libcrypto.

:

cd ~/.local/share/letsencrypt/bin/
./pip uninstall cryptography pyopenssl -y
./pip install --upgrade pip
rm -rf ~/.cache/
./pip install cryptography pyopenssl

, .

+4
3

undefined symbol: OPENSSL_sk_num openssl. , openssl ~/.local/share, . / .

0

Python3.6.2 Centos 7, intalled openssl 1.0.1e, openssl 1.1.0.e. .

cd ${openssl_src_path}

${openssl_src_path} '/usr/local/server/openssl-1.1.0e'

./configure --prefix=/usr/local --openssldir=/usr/local/openssl

make
make test
make install

OpenSSL, Python3.6.2

cd ${python_src_path}/Modules

"Setup", :

    SSL=/usr/local/openssl
_ssl _ssl.c \
    -DUSE_SSL -I/usr/local/openssl/include -I/usr/local/openssl/include/openssl \
    -L/usr/local/openssl/lib -lssl -lcryptoere

'SSL =/usr/local/openssl' - OpenSSL '--openssldir'. , DUSE_SSL.

cd ${python_src_path}
./configure
make
make install

, .

0

It seems that in version 1.1.0f from openssl the character has OPENSSL_sk_nummoved to libcrypto.a. Building python 3 does not seem to bind this, hence the missing character. However, I was mistaken. When the file is Modules/Setup.distmodified to get your own version of openssl, you need to copy it to Modules/Setup, otherwise it will use the already installed ssl.

0
source

Source: https://habr.com/ru/post/1669149/


All Articles