Opened 4 years ago

Closed 3 years ago

#3386 closed bug (Fixed)

ImportError: /home/deluge/.local/lib/python3.7/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so: Undefined symbol "OPENSSL_no_config"

Reported by: fdge00 Owned by:
Priority: trivial Milestone: not applicable
Component: Unknown Version: 2.0.3
Keywords: Cc:

Description

Python 3.7
libtorrent 1.2.5
boost 1.72
FreeBSD 11.3-RELEASE-p7 (FreeNAS-11.3-U2 amd64) (Jail Type: Basejail)

Traceback (most recent call last):
  File "/home/deluge/.local/bin/deluged", line 11, in <module>
    load_entry_point('deluge==2.0.4.dev0', 'console_scripts', 'deluged')()
  File "/home/deluge/.local/lib/python3.7/site-packages/deluge-2.0.4.dev0-py3.7.egg/deluge/core/daemon_entry.py", line 90, in start_daemon
    from deluge.core.daemon import is_daemon_running
  File "/home/deluge/.local/lib/python3.7/site-packages/deluge-2.0.4.dev0-py3.7.egg/deluge/core/daemon.py", line 22, in <module>
    from deluge.core.core import Core
  File "/home/deluge/.local/lib/python3.7/site-packages/deluge-2.0.4.dev0-py3.7.egg/deluge/core/core.py", line 42, in <module>
    from deluge.core.rpcserver import export
  File "/home/deluge/.local/lib/python3.7/site-packages/deluge-2.0.4.dev0-py3.7.egg/deluge/core/rpcserver.py", line 21, in <module>
    from OpenSSL import crypto
  File "/home/deluge/.local/lib/python3.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/home/deluge/.local/lib/python3.7/site-packages/OpenSSL/crypto.py", line 15, in <module>
    from OpenSSL._util import (
  File "/home/deluge/.local/lib/python3.7/site-packages/OpenSSL/_util.py", line 6, in <module>
    from cryptography.hazmat.bindings.openssl.binding import Binding
  File "/home/deluge/.local/lib/python3.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 16, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: /home/deluge/.local/lib/python3.7/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so: Undefined symbol "OPENSSL_no_config"

Change History (3)

comment:1 Changed 4 years ago by fdge00

Finally got the daemon to start.
The problem was Python using the OpenSSL that is part of the base Jail (OpenSSL 1.0.2s-freebsd 28 May 2019).
The solution was to export some paths:

export CPATH=/usr/local/include; \
export LIBRARY_PATH=/usr/local/lib; \
export LD_LIBRARY_PATH=/usr/local/lib;

(I'm going to document my other problems that were related in case anyone else wants to do things a difficult way)
My other problem was I was logged in as root but I wanted deluge installed under it's user, and I didn't want to login as that user or change it's shell (/sbin/nologin).
I needed to use "--preserve-env" when using sudo:

sudo -H -u deluge python3.7 -m pip install --no-cache-dir --user --upgrade pip; \
sudo --preserve-env -H -u deluge python3.7 -m pip install --no-cache-dir --user --upgrade deluge;

"--no-cache-dir" is probably not necessary if it is done correctly the first time.
I should have used "--preserve-env=list" instead but is was working and I was done learning.

comment:2 Changed 4 years ago by fdge00

  • Milestone needs verified deleted
  • Priority changed from minor to trivial

comment:3 Changed 3 years ago by Cas

  • Milestone set to not applicable
  • Resolution set to Fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.