R
R
Ruslan2016-07-15 13:29:12
Debian
Ruslan, 2016-07-15 13:29:12

How to solve the problem with locales in Debian?

I recently installed Debian to replace Ubuntu.
And when installing something through apt during the installation, an error popped up:

Can't set locale; make sure $LC_* and $LANG are correct!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
  LANGUAGE = (unset),
  LC_ALL = "en_US.utf8",
  LC_TIME = "ru_RU.utf8",
  LC_MONETARY = "ru_RU.utf8",
  LC_TYPE = "en_US.UTF-8",
  LC_MEASUREMENT = "ru_RU.utf8",
  LC_NUMERIC = "ru_RU.utf8",
  LC_PAPER = "ru_RU.utf8",
  LANG = "en_US.utf8"
    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

... and installed.
Googling found a site where they explain how to remove the error.
I did everything as they said, but the error did not go away, plus, when you open the terminal, it appears
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)

PS I started learning Linux not so long ago, so I might not know something. Please do not judge strictly.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Movchan, 2016-07-15
@rudi337

Try replacing en_US.utf8 with en_US.UTF-8 .
First, try changing the environment variables:

export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
...

If it helps, edit the file /etc/locale.conf
Here you can read in more detail.

I
Igor Nikolaev, 2016-07-15
@nightvich

$ sudo locale-gen "en_US.UTF-8"
Generating locales...
  en_US.UTF-8... done
Generation complete.

$ sudo dpkg-reconfigure locales
Generating locales...
  en_US.UTF-8... up-to-date
Generation complete.

The most useful skill is to learn how to use Google.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question