Unable to install Deluge on Raspbian Bookworm

General support for problems installing or using Deluge
Post Reply
darkwolfx
New User
New User
Posts: 1
Joined: Fri Nov 08, 2024 12:48 am

Unable to install Deluge on Raspbian Bookworm

Post by darkwolfx »

Hello,

I had installed Deluge on Raspbian Buster fine for a few years, then noticed I was getting behind on updates so upgraded to Bookworm, followed the same installation instructions on Deluge Wiki https://deluge-torrent.org/installing/linux/ubuntu/.

But then ran into the "Unable to initialize gettext/locale!" Issue. Deluge still starts, but with errors and does not work properly.
By researching this error, found out I had to update my locale settings, which I had already done, then noticed I had missing the LANGUAGE and LC_ALL fields from it, but created them via the /etc/environment and set them up, now they are complete, but Deluge is still complaining of the same thing.

Complete error:

Code: Select all

nable to initialize gettext/locale!
module 'gettext' has no attribute 'bind_textdomain_codeset'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/i18n/util.py", line 111, in setup_translation
    gettext.bind_textdomain_codeset(I18N_DOMAIN, 'UTF-8')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'gettext' has no attribute 'bind_textdomain_codeset'
18:46:45 [ERROR   ][deluge.i18n.util  :146 ] Unable to initialize gettext/locale!
18:46:45 [ERROR   ][deluge.i18n.util  :147 ] module 'gettext' has no attribute 'bind_textdomain_codeset'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/i18n/util.py", line 111, in setup_translation
    gettext.bind_textdomain_codeset(I18N_DOMAIN, 'UTF-8')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'gettext' has no attribute 'bind_textdomain_codeset'
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
18:46:47 [ERROR   ][deluge.i18n.util                  :146 ] Unable to initialize gettext/locale!
18:46:47 [ERROR   ][deluge.i18n.util                  :147 ] module 'gettext' has no attribute 'bind_textdomain_codeset'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/i18n/util.py", line 111, in setup_translation
    gettext.bind_textdomain_codeset(I18N_DOMAIN, 'UTF-8')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'gettext' has no attribute 'bind_textdomain_codeset'
Here is my complete locale settings:

Code: Select all

LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
I already did deluge command and sudo deluge, same issue with both.
What do you think I'm missing guys? This is a new Bookworm build.
User avatar
ambipro
Moderator
Moderator
Posts: 672
Joined: Thu May 19, 2022 3:33 am
Contact:

Re: Unable to install Deluge on Raspbian Bookworm

Post by ambipro »

That sounds like you are missing a dependency, but I'm not really too familiar with the translations and stuff.

Did you install all of the packages or just specifically what you thought you wanted? Perhaps the installation failed to install on something that was required or it missed something...

I would try installing via pip if possible, rather than apt.
mhertz
Moderator
Moderator
Posts: 2331
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Unable to install Deluge on Raspbian Bookworm

Post by mhertz »

As inferred by the good ambipro above, old deluge better worth updating through pip or PPA. Anyway, gettext error fix described here(latter ValueError described there, to be ignored):

viewtopic.php?p=236670#p236670

Later xdg-runtime error, is sudo not properly setup or root, e.g export missing var, Google export XDG_RUNTIME_DIR etc.
Post Reply