You get a bonus - 1 coin for daily activity. Now you have 1 coin

Debian - error "locale: Cannot set LC_CTYPE to default locale: No such file or directory"

Practice



If almost every action (i.e., an action that touches the current locale) in Linux Debian (or Ubuntu) throws an error message like:

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

then that means the necessary locale files simply aren't installed.

Well then, let's install them. In the example below we'll install KOI8-R.

$ sudo localedef ru_RU.KOI8-R -i ru_RU -fKOI8-R

And here are examples, respectively, for UTF-8 and CP1251:

$ sudo localedef ru_RU.UTF-8 -i ru_RU -fUTF-8

$ sudo localedef --no-archive -c -f CP1251 -i ru_RU ru_RU.CP1251

After this, such messages should disappear.

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "LINUX operating system"

Terms: LINUX operating system