Page 1 of 1

Raspberry PI - Starting deluge-web returns an error

Posted: Fri Apr 22, 2016 10:29 am
by Milorad
Greetings to all.
I've installed Deluge on a Raspberry Pi lately. It works... Well sort of. I can access the daemon from my Mac. But... I can't access the Web UI.

In the terminal, I entered the following command:
pi@raspberrypi ~ $ deluge-web

It returns the following error:
[ERROR ] 12:19:10 server:76 Unable to initialize gettext/locale: unsupported locale setting

And the prompt keeps blinking. To get out I must do ctrl+C.

Re: Raspberry PI - Starting deluge-web returns an error

Posted: Fri Apr 22, 2016 11:26 am
by Cas
Did you attempt the suggestion in your other post... https://www.raspberrypi.org/forums/view ... 1&t=130874

There are also a lot of suggestions when you search for that error so how many of them have you tried?

Re: Raspberry PI - Starting deluge-web returns an error

Posted: Fri Apr 22, 2016 3:39 pm
by Milorad
Hello Cas

I completely forgot about that question on the Raspberry Forum. It's the only one I posted besides here on Deluge. I guess I never went back to check, if there was an answer. Thanks for reminding me. If I still have a problem, I'll come back on this forum as I can be noticed when I get an answer.

Re: Raspberry PI - Starting deluge-web returns an error

Posted: Sat Apr 23, 2016 11:26 am
by Milorad
This problem is driving me nuts. I'm getting nowhere to solve the "locale" error I get attempting to start "deluge-web". The suggestion on the RaspberryPi was to try:
sudo raspi-config
After setting the Time Zone and the language it returns the following:

Code: Select all

pi@raspberrypi ~ $ sudo raspi-config
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
On an other post -> http://www.linuxquestions.org/questions ... ry-218622/ -> found this:
"..make sure that the locale you are using locally (as in on the machine that you use to connect to a remote host) is also available on the server.

In my case the default locale on my laptop was en_GB.UTF-8, but the server was using en_US.UTF-8 only. I solved this by adding en_GB.UTF-8 to /etc/default/locale (via "dpkg-reconfigure locales" on a Debian box).

It took me a while to figure this out."

On my MacBook I checked the locale with the command "locale" and it returns:

Code: Select all

LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
I'm getting desperate :-((

Thank you for your help !!

Re: Raspberry PI - Starting deluge-web returns an error

Posted: Sat Apr 23, 2016 11:37 am
by Cas
It doesn't matter whether it's gb or us what matters is you need UTF8 locale installed...

https://askubuntu.com/questions/162391/ ... cale-issue

You need LANG and LC_ALL to be set to a UTF8 locale...

Re: Raspberry PI - Starting deluge-web returns an error

Posted: Sat Apr 23, 2016 12:43 pm
by Milorad
Hello again;
Well no success !! You must know before I continue that I'm completely illiterate on Linux and the terminal :?

I followed your reply and war to https://askubuntu.com/questions/162391/ ... cale-issue
and did the following:
sudo locale-gen "en_US.UTF-8"
return is:
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.

sudo dpkg-reconfigure locales
return is:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

I edited the file /etc/environment with:
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8

Any suggestions from here
Thank you.

Re: Raspberry PI - Starting deluge-web returns an error

Posted: Sat Apr 23, 2016 1:05 pm
by Cas
You need to learn to search for errors...

https://stackoverflow.com/questions/249 ... -from-perl

Re: Raspberry PI - Starting deluge-web returns an error

Posted: Sat Apr 23, 2016 2:12 pm
by Milorad
Honestly I don't really know what I did, but… I entered again the command
sudo dpkg-reconfigure locales -> with the return
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete. -> As you can see without all the perl errors. So I started again the Web UI with the command:

deluge-web -> with no return, the prompt keeps blinking as if the process hangs. I must do ctrl+c to have the hand again.

Best regards.

Re: Raspberry PI - Starting deluge-web returns an error

Posted: Sat Apr 23, 2016 3:26 pm
by Cas
In 1.3 deluge-web needs explicitly forked with the '--fork' option

Re: Raspberry PI - Starting deluge-web returns an error

Posted: Sat Apr 23, 2016 4:57 pm
by Milorad
Good evening :D :D

Well… It works. I can connect to the Web UI. Thank you for your help and I wish you an excellent weekend !!