0

This question already has an answer here:

When I log into my server (Debian 7) through PuTTY, I get greeted by a message saying:

-bash: warning: setlocale: LC_ALL: cannot change locale (en_GB.UTF-8).

Then, when I try to run almost any command I get this:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_GB:en",
        LC_ALL = "en_GB.UTF-8",
        LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

I have looked all over the web for help. My /etc/environment file has 'LC_ALL="en_GB.UTF-8"' within it.

Typing;

locale -a

prints the following:

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_COLLATE to default locale: No such file or directory
C
C.UTF-8
POSIX

This is the result of locale-gen:

root@vps94194:/# locale-gen
-bash: locale-gen: command not found

The same goes for the update-locale command.

I cannot reinstall the locale through aptitude as the error blocks it. I can't use dpkg to reconfigure for the same reason.

I really don't know how to fix this. Nothing so far has made any difference.

EDIT: I have checked the thread which this is supposedly a duplicate of and have tried all of the solutions on that thread. The problem is still persistent.

marked as duplicate by Florian Diesch, Panther, Eric Carvalho, g_p, muru Sep 23 '14 at 20:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • It seems like the same error, but none of the solutions there fix the issue. - while trying these solutions I now get the error at login repeated. – Gregory Sims Sep 23 '14 at 19:01
  • @OP You should ask this on Unix & Linux as Debian is off-topic here. – muru Sep 23 '14 at 21:14
  • I think you can fix it using the unset command. Like this: unset LANG LC_ALL; sudo apt-get install locales; sudo locale-gen en_GB.UTF-8 – Gunnar Hjalmarsson Sep 23 '14 at 21:46

Browse other questions tagged or ask your own question.