Deluge 2.0.3 on macOS 11.6 w/ Intel

Support for Deluge on Apple Mac OS
Post Reply
earth-sol
New User
New User
Posts: 2
Joined: Mon Oct 25, 2021 11:10 am

Deluge 2.0.3 on macOS 11.6 w/ Intel

Post by earth-sol »

Hello,

I've tried following the steps here to install Deluge 2.0.3 via Homebrew and after multiple re-tries, I'm still running into the below issues, would appreciate any insight!

For background I'm running macOS 11.6 on Intel

When I first run deluge via command line, the below error pops up and then it runs deluge in ThinClient mode.

Code: Select all

Unable to initialize gettext/locale!
'ngettext'
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/deluge/i18n/util.py", line 118, in setup_translation
    builtins.__dict__['_n'] = builtins.__dict__['ngettext']
KeyError: 'ngettext'
If I try to start the daemon from the UI, I get the below error.

Code: Select all

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/deluge/_libtorrent.py", line 23, in <module>
    import deluge.libtorrent as lt
ModuleNotFoundError: No module named 'deluge.libtorrent'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/deluged", line 8, in <module>
    sys.exit(start_daemon())
  File "/usr/local/lib/python3.9/site-packages/deluge/core/daemon_entry.py", line 90, in start_daemon
    from deluge.core.daemon import is_daemon_running
  File "/usr/local/lib/python3.9/site-packages/deluge/core/daemon.py", line 22, in <module>
    from deluge.core.core import Core
  File "/usr/local/lib/python3.9/site-packages/deluge/core/core.py", line 28, in <module>
    from deluge._libtorrent import LT_VERSION, lt
  File "/usr/local/lib/python3.9/site-packages/deluge/_libtorrent.py", line 25, in <module>
    import libtorrent as lt
ImportError: dlopen(/usr/local/lib/python3.9/site-packages/libtorrent.cpython-39-darwin.so, 2): Symbol not found: __Z14bind_info_hashv
  Referenced from: /usr/local/lib/python3.9/site-packages/libtorrent.cpython-39-darwin.so
  Expected in: flat namespace
 in /usr/local/lib/python3.9/site-packages/libtorrent.cpython-39-darwin.so
Steps I took to install:
  1. Code: Select all

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. Code: Select all

    brew install pygobject3 gtk+3 adwaita-icon-theme
  3. Code: Select all

    brew install libtorrent-rasterbar
  4. Code: Select all

    brew link gettext --force
    This just tells me that everything is already linked, I tried unlinking and re-linking everything and still didn't help.
  5. Code: Select all

    pip3 install deluge
    This initially threw an error saying my pip wasn't up to date.
    I ran

    Code: Select all

    usr/local/opt/python@3.9/bin/python3.9 -m pip install --upgrade pip
    and then re-ran

    Code: Select all

    pip3 install deluge
Also ran through viewtopic.php?f=13&t=55912 and uninstalled everything and re-installed including the dependencies, still no luck :(
bolshoi
Member
Member
Posts: 10
Joined: Sun Oct 25, 2020 5:42 am

Re: Deluge 2.0.3 on macOS 11.6 w/ Intel

Post by bolshoi »

The gettext error can be ignored, i get it all the time, no impact.

The other error is complaining about missing libtorrent looks like, try install with brew:

Code: Select all

brew install libtorrent-rasterbar
earth-sol
New User
New User
Posts: 2
Joined: Mon Oct 25, 2021 11:10 am

Re: Deluge 2.0.3 on macOS 11.6 w/ Intel

Post by earth-sol »

libtorrent is installed (part of step 3 that I did), but the error specifically says

Code: Select all

Symbol not found: __Z14bind_info_hashv
  Referenced from: /usr/local/lib/python3.9/site-packages/libtorrent.cpython-39-darwin.so
  Expected in: flat namespace
Looks like __Z14bind_info_hashv is referenced somewhere in the libtorrent install and can't be found in the flat namespace?
mhertz
Moderator
Moderator
Posts: 1333
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge 2.0.3 on macOS 11.6 w/ Intel

Post by mhertz »

When you first posted, I googled the libtorrent import error and didn't find same symbol reference, but others, including afterwards the 'flat namedpace' message, and was because mixing clang with gcc components, or libc++ VS libstdc++, but imho was to vague for me to post at the time. Still no solution sadly, but regoogling it now, then a little old thread at stackoverflow was posted to a question regarding why one was getting "missing symbol xxx" and "flat namespaces" errors, so cannot use directly, but maybe indirectly: https://stackoverflow.com/questions/297 ... -namespace

Also, bolshoi had issue with another symbol, though atomic related and on raspbian, but nonetheless, and posted helpful instructions on how he fixed it by downgrading libtorrent with homebrew, here: viewtopic.php?f=7&t=56009

Sorry have no direct fix to offer.
Post Reply