0

I tried everything that I could find, including dpkg-reconfigure locale, reinstalling packages completely, adding LC_ALL and other settings to etc/environment, tried adding to /etc/locale.conf , to .bashrc... Removing from ssh-d... There is no localepurge package...

When I type locale -a, below is my dump

root@server:~#locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
C
C.UTF-8
en_US.utf8
POSIX

Please test your solution prior to answering my question by creating new user and typing perl, you should get no warning

The thing is I don't want to put locale settings on per-user basis to .bashrc I want to configure system-wide locale so my users don't get below message:

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

1 Answers1

2

You can try using

sudo localectl set-locale LANG=en_GB.UTF-8
or
sudo localectl set-locale LANG=en_GB.UTF-8,LC_ALL=en_GB.UTF-8

to set the language (which was not set) (and optionally catchall) to see if that resolves the issue. localectl list-locales will tell you which are available for your system. You'll need to login and out to have this reflected.

tobyd
  • 471
  • 1
  • 3
  • 12