Update locale error invalid locale settings

I am getting this message every time I do something like starting or stopping a service. perl: warning: Setting locale failed. perl: warning: Please check that your locale settings:

I am getting this message every time I do something like starting or stopping a service.

perl: warning: Setting locale failed.   
perl: warning: Please check that your locale settings:   
        LANGUAGE = "en_US:en",   
        LC_ALL = (unset),   
        LC_MESSAGES = "en_US.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_MESSAGES to default locale: No such file or directory   
locale: Cannot set LC_ALL to default locale: No such file or directory   
(Reading database ... 21173 files and directories currently installed.)  
Removing bind9 ...  
 * Stopping domain name service... bind9                                        [ OK ]
Processing triggers for man-db ...   
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   

How do I fix this error ?

JJD's user avatar

JJD

8023 gold badges19 silver badges46 bronze badges

asked Jul 11, 2012 at 14:08

HackToHell's user avatar

4

First run locale to list what locales currently defined for the current user account:

$ locale
LANG=C
LANGUAGE=
LC_CTYPE=fi_FI.UTF-8
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE=fi_FI.UTF-8
LC_MONETARY="C"
LC_MESSAGES=fi_FI.UTF-8
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

Then generate the missing locale and reconfigure locales to take notice:

$ 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.

Now you will not see any errors anymore!

Sheharyar's user avatar

Sheharyar

1,15812 silver badges18 bronze badges

answered Dec 10, 2012 at 12:45

Otto Kekäläinen's user avatar

Otto KekäläinenOtto Kekäläinen

5,9741 gold badge13 silver badges3 bronze badges

18

Nothing suggested above worked in my case (Ubuntu Server 12.04LTS). What finally helped
was putting to the file /etc/environment:

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

For some reason it was missing. The outputs for locale and other commands appeared like the variables were properly defined. In other words don’t take for granted all the basic stuff is declared where it should be declared.

Nicolás's user avatar

Nicolás

2593 silver badges11 bronze badges

answered Dec 16, 2012 at 4:11

Marcin's user avatar

MarcinMarcin

4,1591 gold badge12 silver badges3 bronze badges

16

They should disappear after issuing:

sudo locale-gen en_US en_US.UTF-8
sudo dpkg-reconfigure locales 

dpkg-reconfigure reconfigures packages after they have already been
installed. Pass it the names of a package or packages to reconfigure.
It will ask configuration questions, much like when the package was
first installed.

Jean-Christophe Meillaud's user avatar

answered Jul 11, 2012 at 14:19

Rinzwind's user avatar

RinzwindRinzwind

288k39 gold badges561 silver badges701 bronze badges

11

Just add the following to your .bashrc file (assuming you’re using bash)

export LC_ALL="en_US.UTF-8"

devav2's user avatar

devav2

35.1k17 gold badges78 silver badges82 bronze badges

answered Nov 8, 2012 at 9:42

ratz's user avatar

ratzratz

1,3891 gold badge8 silver badges2 bronze badges

8

This is a common problem if you are connecting remotely, so the solution is to not forward your locale. Edit /etc/ssh/ssh_config and comment out SendEnv LANG LC_* line.

warvariuc's user avatar

warvariuc

2,2554 gold badges26 silver badges42 bronze badges

answered Oct 1, 2014 at 0:45

user249697's user avatar

user249697user249697

1,1791 gold badge7 silver badges5 bronze badges

8

There is a command for that:

sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8

It updates /etc/default/locale with provided values.

To apply the changes, you can

source /etc/default/locale

Katu's user avatar

Katu

3,51324 silver badges41 bronze badges

answered Aug 1, 2014 at 11:51

sgtpep's user avatar

sgtpepsgtpep

9976 silver badges3 bronze badges

5

What worked for me on 12.10 was this:

apt-get install language-pack-en-base  

This was after dpkg-reconfigure locales produced no results.

Seth's user avatar

Seth

56.2k43 gold badges144 silver badges196 bronze badges

answered Apr 28, 2013 at 2:01

George Answerology's user avatar

7

Don’t forget exit your SSH session (or your X11) by exiting and logging back in again. All of these suggestions didn’t work for me unless I logged back in….

answered Sep 26, 2014 at 6:51

Michael Galaxy's user avatar

1

For Ubuntu 12.10 none of the above worked except for ratzs’ solution. I recommend adding this to your /etc/bash.bashrc file:

export LC_ALL="en_ZA.UTF-8"
export LC_CTYPE="en_ZA.UTF-8"

answered Mar 27, 2013 at 3:19

Lovemore Nalube's user avatar

1

I was stuck in a weird state where my local machine is set to es and so the remote machine (via vagrant) had been provisioned in an un-handled state. Therefore, I had to use the manual export= only to facilitate a successful dpkg-reconfigure. Then the system is fine.

export LC_ALL="en_US.UTF-8"
sudo dpkg-reconfigure locales

answered Mar 22, 2016 at 18:02

Charney Kaye's user avatar

1

I wrote a bash script to fix above issue.The above answers are useful but setting the locale variables by simply exporting the values in shell variable will work only for a session. I permanently solved this issue by exporting the locale variables in .bash_profile file. You can also use /etc/profile file instead of .bash_profile.

echo "export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8">>~/.bash_profile

Don’t forget to source the .bash_profile and follow the script in easy setup.

answered Feb 27, 2016 at 19:26

Ajeet Khan's user avatar

Ajeet KhanAjeet Khan

4937 silver badges10 bronze badges

You can try:

export LANGUAGE=ru_RU.UTF-8
export LC_CTYPE=ru_RU.UTF-8
export LC_NUMERIC=ru_RU.UTF-8
export LC_TIME=ru_RU.UTF-8
export LC_COLLATE=ru_RU.UTF-8
export LC_MONETARY=ru_RU.UTF-8
export LC_MESSAGES=ru_RU.UTF-8
export LC_PAPER=ru_RU.UTF-8
export LC_NAME=ru_RU.UTF-8
export LC_ADDRESS=ru_RU.UTF-8
export LC_TELEPHONE=ru_RU.UTF-8
export LC_MEASUREMENT=ru_RU.UTF-8
export LC_IDENTIFICATION=ru_RU.UTF-8
export LC_ALL=ru_RU.UTF-8

where ru_RU is your country code.

Eric Carvalho's user avatar

Eric Carvalho

53k102 gold badges134 silver badges161 bronze badges

answered Jun 17, 2013 at 13:34

Koss's user avatar

KossKoss

1892 silver badges2 bronze badges

Current accepted answer is not sufficient in the troubleshoot strategy because you can have an human error.
You setup your system to en_US but you have en_GB enabled in/etc/locale.gen like I had in the thread here for Raspberry Pi 3b.
You should have all your used locales enabled in /etc/locale.gen.

I had en_GB.UTF-8 UTF-8 only enabled in /etc/locale.gen. I should have there only enabled en_US.UTF-8 UTF-8 because of other commands run for it. So I commented GB and uncommented US, and everything work now

masi@raspberrypi:~ $ sudo vim /etc/locale.gen

masi@raspberrypi:~ $ sudo locale-gen 
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.

masi@raspberrypi:~ $ sudo a2enmod rewrite && a2enmod headers && a2enmod ssl
Module rewrite already enabled
Module headers already enabled
Considering dependency setenvif for ssl:
Module setenvif already enabled
Considering dependency mime for ssl:
Module mime already enabled
Considering dependency socache_shmcb for ssl:
Module socache_shmcb already enabled
Module ssl already enabled

Now, I do not get those locale mistakes with any commands.

System: Raspbian Jessie
Hardware: Raspberry Pi 3b

Community's user avatar

answered Jun 22, 2016 at 20:25

Léo Léopold Hertz 준영's user avatar

As said here in the Debian Wiki, you can edit /etc/locale.gen and add all locales (or uncomment them, I had a list of all locales but all except the one I used as comments) you wish to have support for on your system. Then, execute

sudo dpkg-reconfigure locales

to update the locales on your system. Now, all of the locales you added/uncommented in /etc/locale.gen are available on your system without any warnings.

GabLeRoux's user avatar

answered Dec 14, 2014 at 11:28

msrd0's user avatar

msrd0msrd0

2375 silver badges14 bronze badges

If you use KDE environment, check the setlocale.sh file in ~/.kde/env/:

$ cat ~/.kde/env/setlocale.sh 
export LANG=en_US.UTF-8
export LANGUAGE=en_US:ru:en

Community's user avatar

answered Feb 5, 2014 at 8:36

MaximKostrikin's user avatar

2

This worked for me when I had the same problem (based on the solution provided by dman):

sudo sh -c "echo -e 'LC_ALL=en_US.UTF-8nLANG=en_US.UTF-8' >> /etc/environment"

Community's user avatar

answered Aug 27, 2014 at 5:21

pythonhunter's user avatar

2

  1. You may need to run sudo dpkg-reconfigure also for the application you have installed while «locale» settings have been invalid / not matching.

    While system locale was incorrectly setup I installed vim. Later when system locale was fixed I saw a situation that vim was showing utf-8 characters incorrectly as strange symbols while nano and less were showing them correctly. Running

    sudo dpkg-reconfigure vim
    

    appeared to fix the issue after the system settings were fixed.

  2. I also noticed the same thing as already mentioned: You may need to disconnect/reconnect SSH to make changes visible.

msrd0's user avatar

msrd0

2375 silver badges14 bronze badges

answered Dec 18, 2014 at 19:02

ajaaskel's user avatar

ajaaskelajaaskel

931 silver badge5 bronze badges

Adding the following text to ~/.profile works for me:

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

I am using Ubuntu 16.04 LTS 64-bit server on Linode.

answered May 9, 2017 at 3:07

Jingguo Yao's user avatar

Source of the problem

I experienced this, logging in from one machine to another via ssh. The remote machine didn’t have the locale files, that I had on my local machine. You can either disable the forwarding of the locale from your local machine to the remote machine (in the file /etc/ssh/sshd_config remove the line AcceptEnv LANG LC_CTYPE …) or install the locale (changing it is not necessary in this case).

Installing

On Fedora, RHEL, Redhat, CentOS I used

sudo dnf install langpacks-de

for the german (de) language packs. Logged out and in and it worked.

Search for other langpacks with

dnf search langpacks-

Changing/Activating

To list available locales I used

localectl list-locales

And to set a new one

sudo localectl set-locale de_DE.utf8

answered Feb 6, 2020 at 23:43

erik's user avatar

erikerik

6578 silver badges15 bronze badges

4

remove locales using localepurge you don’t need and reboot

apt install localepurge

answered Apr 9, 2022 at 21:41

assayag.org's user avatar

assayag.orgassayag.org

3762 silver badges7 bronze badges

Автор Сергей Н.П., 01 апреля 2020, 22:47:34

« назад — далее »

0 Пользователи и 1 гость просматривают эту тему.

Добрый вечер, уважаемые форумчане. Вопрос у меня вроде бы простой, но решение найти самостоятельно не получается. Дело в том что установил новую систему бустер а вот русский язык выставить не могу, инфы по этому поводу полно в инете но все сводится к двум вариантам 1 это с помощью

Открыть содержимое (спойлер)

Перенастраиваем пакет locales командой:
dpkg-reconfigure locales
В появившейся форме ищем локаль ru_RU.UTF-8 и отмечаем её нажатием пробелом, в результате перед этой локалью появится звёздочка, как показано на изображении ниже. Затем нажимаем Enter и переходим к следующему шагу.
Следующий шаг – выбор локали по умолчанию. Выбераем русскую локаль из списка и нажмаем Enter.
В результате будет завершена перенастройка локали и теперь необходимо только выполнить повторное подключение к консоли и к удаленному рабочему столу (если таковое используется).

[свернуть]

И способ 2

Открыть содержимое (спойлер)

Устанавливаем языковой пакет:
apt-get install language-pack-ru
Открываем текстовым редактором файл /etc/default/locale:
nano /etc/default/locale
Заменяем его содержимое на:
LANGUAGE=ru_RU:ru
LANG=ru_RU.UTF-8

[свернуть]

пробовал оба варианта результат как был в инглише так и остаюсь по умолчанию. Есть по этомувопросу соображения? Вот данные по моей системе

Открыть содержимое (спойлер)

oot@debian:~# uname -a                 
Linux debian 5.2.9-kirkwood-tld-1 #1 PREEMPT Sat Aug 17 15:00:56 PDT 2019 armv5tel GNU/Linux
root@debian:~# lsb_release -a
-bash: lsb_release: command not found
root@debian:~# cat /etc/apt/sources.list
deb http://ftp.us.debian.org/debian buster main
deb-src http://ftp.us.debian.org/debian buster main

deb http://security.debian.org/ buster/updates main contrib non-free
deb-src  http://security.debian.org/ buster/updates main contrib non-free

deb     http://http.debian.net/debian buster-updates main contrib
deb-src http://http.debian.net/debian buster-updates main contrib

deb [arch=armv5tel] http://mirror.mephi.ru/mariadb/repo/10.4/debian buster main
deb-src http://mirror.mephi.ru/mariadb/repo/10.4/debian buster main
root@debian:~# ls /etc/apt/sources.list.d
.  ..
root@debian:~#

[свернуть]

Команда <locale> выдает :

Открыть содержимое (спойлер)

root@debian:~# locale
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
LANG=ru_RU.UTF-8
LANGUAGE=ru_RU:ru
LC_CTYPE=»ru_RU.UTF-8″
LC_NUMERIC=»ru_RU.UTF-8″
LC_TIME=»ru_RU.UTF-8″
LC_COLLATE=»ru_RU.UTF-8″
LC_MONETARY=»ru_RU.UTF-8″
LC_MESSAGES=»ru_RU.UTF-8″
LC_PAPER=»ru_RU.UTF-8″
LC_NAME=»ru_RU.UTF-8″
LC_ADDRESS=»ru_RU.UTF-8″
LC_TELEPHONE=»ru_RU.UTF-8″
LC_MEASUREMENT=»ru_RU.UTF-8″
LC_IDENTIFICATION=»ru_RU.UTF-8″
LC_ALL=
root@debian:~#
Файл /etc/default/locale выглядит вот так:

Открыть содержимое (спойлер)

root@debian:~# cat /etc/default/locale
LANGUAGE=»ru_RU:ru»
#LANG=»ru_RU.KOI8-R»
root@debian:~#

[свернуть]

Хотя я настраивал LANG=ru__RU.UTF-8 ‘Это видно тут:

Открыть содержимое (спойлер)

                                │ │               None                        │ │ 
                                     │ │               C.UTF-8                     │ │ 
                                     │ │               ru_RU.UTF-8                 │ │ 
                                     │ └───────────────────────────────────────────┘ │ 
                                     ├───────────────────────────────────────────────┤ 
                                     │           <  OK  >      <Cancel>              │ 
                                     └───────────────────────────────────────────────┘ 

                                       Generating locales (this might take a while)…
  ru_RU.UTF-8…Killed
done
Generation complete.
*** update-locale: Error: invalid locale settings:  LANG=ru_RU.UTF-8 LANGUAGE=ru_RU:

[свернуть]

Кружусь на одном месте, вероятно где то делаю не верно, а вот где ума не приложу. Прошу направить на верную дорогу.



Спасибо за ссылку, но у меня вывод в /etc/locale.gen

Открыть содержимое (спойлер)

ot@debian:~# cat /etc/locale.gen
# This file lists locales that you wish to have built. You can find a list
# of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add
# user defined locales to /usr/local/share/i18n/SUPPORTED. If you change
# this file, you need to rerun locale-gen.

# aa_DJ ISO-8859-1
# aa_DJ.UTF-8 UTF-8
# aa_ER UTF-8
# aa_ER@saaho UTF-8
# aa_ET UTF-8
# af_ZA ISO-8859-1
# af_ZA.UTF-8 UTF-8
# agr_PE UTF-8
# ak_GH UTF-8
# am_ET UTF-8
# an_ES ISO-8859-15
# an_ES.UTF-8 UTF-8
# anp_IN UTF-8
# ar_AE ISO-8859-6
# ar_AE.UTF-8 UTF-8
# ar_BH ISO-8859-6
# ar_BH.UTF-8 UTF-8
# ar_DZ ISO-8859-6
# ar_DZ.UTF-8 UTF-8
# ar_EG ISO-8859-6
# ar_EG.UTF-8 UTF-8
# ar_IN UTF-8
# ar_IQ ISO-8859-6
# ar_IQ.UTF-8 UTF-8
# ar_JO ISO-8859-6
# ar_JO.UTF-8 UTF-8
# ar_KW ISO-8859-6
# ar_KW.UTF-8 UTF-8
# ar_LB ISO-8859-6
# ar_LB.UTF-8 UTF-8
# ar_LY ISO-8859-6
# ar_LY.UTF-8 UTF-8
# ar_MA ISO-8859-6
# ar_MA.UTF-8 UTF-8
# ar_OM ISO-8859-6
# ar_OM.UTF-8 UTF-8
# ar_QA ISO-8859-6
# ar_QA.UTF-8 UTF-8
# ar_SA ISO-8859-6
# ar_SA.UTF-8 UTF-8
# ar_SD ISO-8859-6
# ar_SD.UTF-8 UTF-8
# ar_SS UTF-8
# ar_SY ISO-8859-6
# ar_SY.UTF-8 UTF-8
# ar_TN ISO-8859-6
# ar_TN.UTF-8 UTF-8
# ar_YE ISO-8859-6
# ar_YE.UTF-8 UTF-8
# as_IN UTF-8
# ast_ES ISO-8859-15
# ast_ES.UTF-8 UTF-8
# ayc_PE UTF-8
# az_AZ UTF-8
# az_IR UTF-8
# be_BY CP1251
# be_BY.UTF-8 UTF-8
# be_BY@latin UTF-8
# bem_ZM UTF-8
# ber_DZ UTF-8
# ber_MA UTF-8
# bg_BG CP1251
# bg_BG.UTF-8 UTF-8
# bhb_IN.UTF-8 UTF-8
# bho_IN UTF-8
# bho_NP UTF-8
# bi_VU UTF-8
# bn_BD UTF-8
# bn_IN UTF-8
# bo_CN UTF-8
# bo_IN UTF-8
# br_FR ISO-8859-1
# br_FR.UTF-8 UTF-8
# br_FR@euro ISO-8859-15
# brx_IN UTF-8
# bs_BA ISO-8859-2
# bs_BA.UTF-8 UTF-8
# byn_ER UTF-8
# ca_AD ISO-8859-15
# ca_AD.UTF-8 UTF-8
# ca_ES ISO-8859-1
# ca_ES.UTF-8 UTF-8
# ca_ES@euro ISO-8859-15
# ca_ES@valencia UTF-8
# ca_FR ISO-8859-15
# ca_FR.UTF-8 UTF-8
# ca_IT ISO-8859-15
# ca_IT.UTF-8 UTF-8
# ce_RU UTF-8
# chr_US UTF-8
# cmn_TW UTF-8
# crh_UA UTF-8
# cs_CZ ISO-8859-2
# cs_CZ.UTF-8 UTF-8
# csb_PL UTF-8
# cv_RU UTF-8
# cy_GB ISO-8859-14
# cy_GB.UTF-8 UTF-8
# da_DK ISO-8859-1
# da_DK.UTF-8 UTF-8
# de_AT ISO-8859-1
# de_AT.UTF-8 UTF-8
# de_AT@euro ISO-8859-15
# de_BE ISO-8859-1
# de_BE.UTF-8 UTF-8
# de_BE@euro ISO-8859-15
# de_CH ISO-8859-1
# de_CH.UTF-8 UTF-8
# de_DE ISO-8859-1
# de_DE.UTF-8 UTF-8
# de_DE@euro ISO-8859-15
# de_IT ISO-8859-1
# de_IT.UTF-8 UTF-8
# de_LI.UTF-8 UTF-8
# de_LU ISO-8859-1
# de_LU.UTF-8 UTF-8
# de_LU@euro ISO-8859-15
# doi_IN UTF-8
# dsb_DE UTF-8
# dv_MV UTF-8
# dz_BT UTF-8
# el_CY ISO-8859-7
# el_CY.UTF-8 UTF-8
# el_GR ISO-8859-7
# el_GR.UTF-8 UTF-8
# el_GR@euro ISO-8859-7
# en_AG UTF-8
# en_AU ISO-8859-1
# en_AU.UTF-8 UTF-8
# en_BW ISO-8859-1
# en_BW.UTF-8 UTF-8
# en_CA ISO-8859-1
# en_CA.UTF-8 UTF-8
# en_DK ISO-8859-1
# en_DK.ISO-8859-15 ISO-8859-15
# en_DK.UTF-8 UTF-8
# en_GB ISO-8859-1
# en_GB.ISO-8859-15 ISO-8859-15
# en_GB.UTF-8 UTF-8
# en_HK ISO-8859-1
# en_HK.UTF-8 UTF-8
# en_IE ISO-8859-1
# en_IE.UTF-8 UTF-8
# en_IE@euro ISO-8859-15
# en_IL UTF-8
# en_IN UTF-8
# en_NG UTF-8
# en_NZ ISO-8859-1
# en_NZ.UTF-8 UTF-8
# en_PH ISO-8859-1
# en_PH.UTF-8 UTF-8
# en_SC.UTF-8 UTF-8
# en_SG ISO-8859-1
# en_SG.UTF-8 UTF-8
# en_US ISO-8859-1
# en_US.ISO-8859-15 ISO-8859-15
# en_US.UTF-8 UTF-8
# en_ZA ISO-8859-1
# en_ZA.UTF-8 UTF-8
# en_ZM UTF-8
# en_ZW ISO-8859-1
# en_ZW.UTF-8 UTF-8
# eo UTF-8
# es_AR ISO-8859-1
# es_AR.UTF-8 UTF-8
# es_BO ISO-8859-1
# es_BO.UTF-8 UTF-8
# es_CL ISO-8859-1
# es_CL.UTF-8 UTF-8
# es_CO ISO-8859-1
# es_CO.UTF-8 UTF-8
# es_CR ISO-8859-1
# es_CR.UTF-8 UTF-8
# es_CU UTF-8
# es_DO ISO-8859-1
# es_DO.UTF-8 UTF-8
# es_EC ISO-8859-1
# es_EC.UTF-8 UTF-8
# es_ES ISO-8859-1
# es_ES.UTF-8 UTF-8
# es_ES@euro ISO-8859-15
# es_GT ISO-8859-1
# es_GT.UTF-8 UTF-8
# es_HN ISO-8859-1
# es_HN.UTF-8 UTF-8
# es_MX ISO-8859-1
# es_MX.UTF-8 UTF-8
# es_NI ISO-8859-1
# es_NI.UTF-8 UTF-8
# es_PA ISO-8859-1
# es_PA.UTF-8 UTF-8
# es_PE ISO-8859-1
# es_PE.UTF-8 UTF-8
# es_PR ISO-8859-1
# es_PR.UTF-8 UTF-8
# es_PY ISO-8859-1
# es_PY.UTF-8 UTF-8
# es_SV ISO-8859-1
# es_SV.UTF-8 UTF-8
# es_US ISO-8859-1
# es_US.UTF-8 UTF-8
# es_UY ISO-8859-1
# es_UY.UTF-8 UTF-8
# es_VE ISO-8859-1
# es_VE.UTF-8 UTF-8
# et_EE ISO-8859-1
# et_EE.ISO-8859-15 ISO-8859-15
# et_EE.UTF-8 UTF-8
# eu_ES ISO-8859-1
# eu_ES.UTF-8 UTF-8
# eu_ES@euro ISO-8859-15
# eu_FR ISO-8859-1
# eu_FR.UTF-8 UTF-8
# eu_FR@euro ISO-8859-15
# fa_IR UTF-8
# ff_SN UTF-8
# fi_FI ISO-8859-1
# fi_FI.UTF-8 UTF-8
# fi_FI@euro ISO-8859-15
# fil_PH UTF-8
# fo_FO ISO-8859-1
# fo_FO.UTF-8 UTF-8
# fr_BE ISO-8859-1
# fr_BE.UTF-8 UTF-8
# fr_BE@euro ISO-8859-15
# fr_CA ISO-8859-1
# fr_CA.UTF-8 UTF-8
# fr_CH ISO-8859-1
# fr_CH.UTF-8 UTF-8
# fr_FR ISO-8859-1
# fr_FR.UTF-8 UTF-8
# fr_FR@euro ISO-8859-15
# fr_LU ISO-8859-1
# fr_LU.UTF-8 UTF-8
# fr_LU@euro ISO-8859-15
# fur_IT UTF-8
# fy_DE UTF-8
# fy_NL UTF-8
# ga_IE ISO-8859-1
# ga_IE.UTF-8 UTF-8
# ga_IE@euro ISO-8859-15
# gd_GB ISO-8859-15
# gd_GB.UTF-8 UTF-8
# gez_ER UTF-8
# gez_ER@abegede UTF-8
# gez_ET UTF-8
# gez_ET@abegede UTF-8
# gl_ES ISO-8859-1
# gl_ES.UTF-8 UTF-8
# gl_ES@euro ISO-8859-15
# gu_IN UTF-8
# gv_GB ISO-8859-1
# gv_GB.UTF-8 UTF-8
# ha_NG UTF-8
# hak_TW UTF-8
# he_IL ISO-8859-8
# he_IL.UTF-8 UTF-8
# hi_IN UTF-8
# hif_FJ UTF-8
# hne_IN UTF-8
# hr_HR ISO-8859-2
# hr_HR.UTF-8 UTF-8
# hsb_DE ISO-8859-2
# hsb_DE.UTF-8 UTF-8
# ht_HT UTF-8
# hu_HU ISO-8859-2
# hu_HU.UTF-8 UTF-8
# hy_AM UTF-8
# hy_AM.ARMSCII-8 ARMSCII-8
# ia_FR UTF-8
# id_ID ISO-8859-1
# id_ID.UTF-8 UTF-8
# ig_NG UTF-8
# ik_CA UTF-8
# is_IS ISO-8859-1
# is_IS.UTF-8 UTF-8
# it_CH ISO-8859-1
# it_CH.UTF-8 UTF-8
# it_IT ISO-8859-1
# it_IT.UTF-8 UTF-8
# it_IT@euro ISO-8859-15
# iu_CA UTF-8
# ja_JP.EUC-JP EUC-JP
# ja_JP.UTF-8 UTF-8
# ka_GE GEORGIAN-PS
# ka_GE.UTF-8 UTF-8
# kab_DZ UTF-8
# kk_KZ PT154
# kk_KZ.RK1048 RK1048
# kk_KZ.UTF-8 UTF-8
# kl_GL ISO-8859-1
# kl_GL.UTF-8 UTF-8
# km_KH UTF-8
# kn_IN UTF-8
# ko_KR.EUC-KR EUC-KR
# ko_KR.UTF-8 UTF-8
# kok_IN UTF-8
# ks_IN UTF-8
# ks_IN@devanagari UTF-8
# ku_TR ISO-8859-9
# ku_TR.UTF-8 UTF-8
# kw_GB ISO-8859-1
# kw_GB.UTF-8 UTF-8
# ky_KG UTF-8
# lb_LU UTF-8
# lg_UG ISO-8859-10
# lg_UG.UTF-8 UTF-8
# li_BE UTF-8
# li_NL UTF-8
# lij_IT UTF-8
# ln_CD UTF-8
# lo_LA UTF-8
# lt_LT ISO-8859-13
# lt_LT.UTF-8 UTF-8
# lv_LV ISO-8859-13
# lv_LV.UTF-8 UTF-8
# lzh_TW UTF-8
# mag_IN UTF-8
# mai_IN UTF-8
# mai_NP UTF-8
# mfe_MU UTF-8
# mg_MG ISO-8859-15
# mg_MG.UTF-8 UTF-8
# mhr_RU UTF-8
# mi_NZ ISO-8859-13
# mi_NZ.UTF-8 UTF-8
# miq_NI UTF-8
# mjw_IN UTF-8
# mk_MK ISO-8859-5
# mk_MK.UTF-8 UTF-8
# ml_IN UTF-8
# mn_MN UTF-8
# mni_IN UTF-8
# mr_IN UTF-8
# ms_MY ISO-8859-1
# ms_MY.UTF-8 UTF-8
# mt_MT ISO-8859-3
# mt_MT.UTF-8 UTF-8
# my_MM UTF-8
# nan_TW UTF-8
# nan_TW@latin UTF-8
# nb_NO ISO-8859-1
# nb_NO.UTF-8 UTF-8
# nds_DE UTF-8
# nds_NL UTF-8
# ne_NP UTF-8
# nhn_MX UTF-8
# niu_NU UTF-8
# niu_NZ UTF-8
# nl_AW UTF-8
# nl_BE ISO-8859-1
# nl_BE.UTF-8 UTF-8
# nl_BE@euro ISO-8859-15
# nl_NL ISO-8859-1
# nl_NL.UTF-8 UTF-8
# nl_NL@euro ISO-8859-15
# nn_NO ISO-8859-1
# nn_NO.UTF-8 UTF-8
# nr_ZA UTF-8
# nso_ZA UTF-8
# oc_FR ISO-8859-1
# oc_FR.UTF-8 UTF-8
# om_ET UTF-8
# om_KE ISO-8859-1
# om_KE.UTF-8 UTF-8
# or_IN UTF-8
# os_RU UTF-8
# pa_IN UTF-8
# pa_PK UTF-8
# pap_AW UTF-8
# pap_CW UTF-8
# pl_PL ISO-8859-2
# pl_PL.UTF-8 UTF-8
# ps_AF UTF-8
# pt_BR ISO-8859-1
# pt_BR.UTF-8 UTF-8
# pt_PT ISO-8859-1
# pt_PT.UTF-8 UTF-8
# pt_PT@euro ISO-8859-15
# quz_PE UTF-8
# raj_IN UTF-8
# ro_RO ISO-8859-2
# ro_RO.UTF-8 UTF-8
# ru_RU ISO-8859-5
# ru_RU.CP1251 CP1251
# ru_RU.KOI8-R KOI8-R
ru_RU.UTF-8 UTF-8
# ru_UA KOI8-U
# ru_UA.UTF-8 UTF-8
# rw_RW UTF-8
# sa_IN UTF-8
# sah_RU UTF-8
# sat_IN UTF-8
# sc_IT UTF-8
# sd_IN UTF-8
# sd_IN@devanagari UTF-8
# se_NO UTF-8
# sgs_LT UTF-8
# shn_MM UTF-8
# shs_CA UTF-8
# si_LK UTF-8
# sid_ET UTF-8
# sk_SK ISO-8859-2
# sk_SK.UTF-8 UTF-8
# sl_SI ISO-8859-2
# sl_SI.UTF-8 UTF-8
# sm_WS UTF-8
# so_DJ ISO-8859-1
# so_DJ.UTF-8 UTF-8
# so_ET UTF-8
# so_KE ISO-8859-1
# so_KE.UTF-8 UTF-8
# so_SO ISO-8859-1
# so_SO.UTF-8 UTF-8
# sq_AL ISO-8859-1
# sq_AL.UTF-8 UTF-8
# sq_MK UTF-8
# sr_ME UTF-8
# sr_RS UTF-8
# sr_RS@latin UTF-8
# ss_ZA UTF-8
# st_ZA ISO-8859-1
# st_ZA.UTF-8 UTF-8
# sv_FI ISO-8859-1
# sv_FI.UTF-8 UTF-8
# sv_FI@euro ISO-8859-15
# sv_SE ISO-8859-1
# sv_SE.ISO-8859-15 ISO-8859-15
# sv_SE.UTF-8 UTF-8
# sw_KE UTF-8
# sw_TZ UTF-8
# szl_PL UTF-8
# ta_IN UTF-8
# ta_LK UTF-8
# tcy_IN.UTF-8 UTF-8
# te_IN UTF-8
# tg_TJ KOI8-T
# tg_TJ.UTF-8 UTF-8
# th_TH TIS-620
# th_TH.UTF-8 UTF-8
# the_NP UTF-8
# ti_ER UTF-8
# ti_ET UTF-8
# tig_ER UTF-8
# tk_TM UTF-8
# tl_PH ISO-8859-1
# tl_PH.UTF-8 UTF-8
# tn_ZA UTF-8
# to_TO UTF-8
# tpi_PG UTF-8
# tr_CY ISO-8859-9
# tr_CY.UTF-8 UTF-8
# tr_TR ISO-8859-9
# tr_TR.UTF-8 UTF-8
# ts_ZA UTF-8
# tt_RU UTF-8
# tt_RU@iqtelif UTF-8
# ug_CN UTF-8
# uk_UA KOI8-U
# uk_UA.UTF-8 UTF-8
# unm_US UTF-8
# ur_IN UTF-8
# ur_PK UTF-8
# uz_UZ ISO-8859-1
# uz_UZ.UTF-8 UTF-8
# uz_UZ@cyrillic UTF-8
# ve_ZA UTF-8
# vi_VN UTF-8
# wa_BE ISO-8859-1
# wa_BE.UTF-8 UTF-8
# wa_BE@euro ISO-8859-15
# wae_CH UTF-8
# wal_ET UTF-8
# wo_SN UTF-8
# xh_ZA ISO-8859-1
# xh_ZA.UTF-8 UTF-8
# yi_US CP1255
# yi_US.UTF-8 UTF-8
# yo_NG UTF-8
# yue_HK UTF-8
# yuw_PG UTF-8
# zh_CN GB2312
# zh_CN.GB18030 GB18030
# zh_CN.GBK GBK
# zh_CN.UTF-8 UTF-8
# zh_HK BIG5-HKSCS
# zh_HK.UTF-8 UTF-8
# zh_SG GB2312
# zh_SG.GBK GBK
# zh_SG.UTF-8 UTF-8
# zh_TW BIG5
# zh_TW.EUC-TW EUC-TW
# zh_TW.UTF-8 UTF-8
# zu_ZA ISO-8859-1
# zu_ZA.UTF-8 UTF-8
root@debian:~#

[свернуть]

как видно ru_RU.UTF-8 UTF-8
раскомментировано а вот после настройки <dpkg-reconfigure locales>вывод

Открыть содержимое (спойлер)

│                                                                            │
│ Default locale for the system environment:                                 │
│ ┌────────────────────────────────────────────────────────────────────────┐ │
│ │                             None                                       │ │
│ │                             C.UTF-8                                    │ │
│ │                             ru_RU.UTF-8                                │ │
│ └────────────────────────────────────────────────────────────────────────┘ │
├────────────────────────────────────────────────────────────────────────────┤
│                       <  OK  >            <Cancel>                         │
└────────────────────────────────────────────────────────────────────────────┘

  Generating locales (this might take a while)…
  ru_RU.UTF-8…Killed
done
Generation complete.
*** update-locale: Error: invalid locale settings:  LANG=ru_RU.UTF-8 LANGUAGE=ru_RU:ru

[свернуть]

ru_RU.UTF-8…Killed (убито) как его оживить?


Попробуйте переустановить пакет locales


Пытаюсь переустановить locales получается вот что :

Открыть содержимое (спойлер)

rgei@debian:~$ apt-get reinstall locales
E: Could not open lock file /var/lib/dpkg/lock-frontend — open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
cergei@debian:~$

[свернуть]

Как нибудь еще можно это сделать?


От пользователя root нужно выполнять, или sudo использовать.


# apt-get install --reinstall locales


Выполнил вот вывод

Открыть содержимое (спойлер)

rgei@debian:~$ ssh root@192.168.1.42
root@192.168.1.42’s password:
Linux debian 5.2.9-kirkwood-tld-1 #1 PREEMPT Sat Aug 17 15:00:56 PDT 2019 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Apr  2 10:47:38 2020 from 192.168.1.34
root@debian:~# apt-get install —reinstall locales
Reading package lists… Done
Building dependency tree       
Reading state information… Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/4060 kB of archives.
After this operation, 0 B of additional disk space will be used.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
   LANGUAGE = «ru_RU:ru»,
   LC_ALL = (unset),
   LANG = «ru_RU.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
Preconfiguring packages …
(Reading database … 21258 files and directories currently installed.)
Preparing to unpack …/locales_2.28-10_all.deb …
Unpacking locales (2.28-10) over (2.28-10) …
Setting up locales (2.28-10) …
Generating locales (this might take a while)…
  ru_RU.UTF-8…Killed
done
Generation complete.
Processing triggers for man-db (2.8.5-2) …
root@debian:~#

[свернуть]

Почемуто после всех настроек все мои настройки сбрасываются на первоначальные смотрю потом /etc/default/locale строка комментируется

Открыть содержимое (спойлер)

LANGUAGE=ru_RU:ru
#LANG=ru_RU.UTF-8

[свернуть]



root@debian:~# locale
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
LANG=ru_RU.UTF-8
LANGUAGE=ru_RU:ru
LC_CTYPE=»ru_RU.UTF-8″
LC_NUMERIC=»ru_RU.UTF-8″
LC_TIME=»ru_RU.UTF-8″
LC_COLLATE=»ru_RU.UTF-8″
LC_MONETARY=»ru_RU.UTF-8″
LC_MESSAGES=»ru_RU.UTF-8″
LC_PAPER=»ru_RU.UTF-8″
LC_NAME=»ru_RU.UTF-8″
LC_ADDRESS=»ru_RU.UTF-8″
LC_TELEPHONE=»ru_RU.UTF-8″
LC_MEASUREMENT=»ru_RU.UTF-8″
LC_IDENTIFICATION=»ru_RU.UTF-8″
LC_ALL=



После изменений locale-gen показывает

Открыть содержимое (спойлер)

oot@debian:~#  locale-gen
Generating locales (this might take a while)…
  ru_RU.UTF-8…Killed
done
Generation complete.

[свернуть]

да а команда <locale>

Открыть содержимое (спойлер)

oot@debian:~# locale
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
LANG=ru_RU.UTF-8
LANGUAGE=ru_RU:ru
LC_CTYPE=»ru_RU.UTF-8″
LC_NUMERIC=»ru_RU.UTF-8″
LC_TIME=»ru_RU.UTF-8″
LC_COLLATE=»ru_RU.UTF-8″
LC_MONETARY=»ru_RU.UTF-8″
LC_MESSAGES=»ru_RU.UTF-8″
LC_PAPER=»ru_RU.UTF-8″
LC_NAME=»ru_RU.UTF-8″
LC_ADDRESS=»ru_RU.UTF-8″
LC_TELEPHONE=»ru_RU.UTF-8″
LC_MEASUREMENT=»ru_RU.UTF-8″
LC_IDENTIFICATION=»ru_RU.UTF-8″
LC_ALL=

[свернуть]


а что показывает:


locale -a


locale -a

Открыть содержимое (спойлер)

root@debian:~# locale -a
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
root@debian:~#

[свернуть]


Хм… Интересно… почему у вас


...Killed

по идеи, если попробовать сконфигурировать любую другую локаль, то получим тоже самое.


А что у вас за железка?
Просто сейчас поставил 10-ку в VirtualBox.
В голой системе русский из коробки…


  • Русскоязычное сообщество Debian GNU/Linux


  • Общие вопросы

  • Настройка русской локализации в Debian

Asked
7 years, 5 months ago

Viewed
34k times

How can I set English as a default language in Debian ?
I’ve installed Debian in a different language.

$ sudo update-locale LANG=en_US.UTF-8 LANGUAGE=en_US  
update-locale: Error: invalid locale settings:  LANGUAGE=en_US LANG=en_US.UTF-8

Thomas Dickey's user avatar

Thomas Dickey

73.1k9 gold badges166 silver badges261 bronze badges

asked Aug 19, 2015 at 19:42

Using sudo dpkg-reconfigure locales should work.

answered Aug 19, 2015 at 20:01

vlp's user avatar

vlpvlp

2511 silver badge6 bronze badges

2

Edit file:

# vim /etc/default/locale

and write the following uncommented line:

#  File generated by update-locale
LANG=en_US.UTF-8

and then comment the current uncommented lines and uncomment the line with en_US.UTF-8 (in the same file):

# en_US.ISO-8859-15 ISO-8859-15
en_US.UTF-8 UTF-8
# en_ZA ISO-8859-1

Save file and run:

# locale-gen

and restart the terminal.

For me, these steps work. I hope it helps you too.

answered Aug 31, 2019 at 22:00

simhumileco's user avatar

simhumilecosimhumileco

4595 silver badges13 bronze badges

3

Can you start with the output of env | grep LANG? Make sure those all point to the proper lang/country, then do the dpkg command as mentioned by @vlp

answered Aug 19, 2015 at 20:19

Jesse K's user avatar

Jesse KJesse K

3611 silver badge10 bronze badges

Check the language environment variable: LC_LANG.

An easier way is to set the LC_ALL or LC_* variable to the value en_GB.UTF-8.

Jeff Schaller's user avatar

Jeff Schaller

65.2k34 gold badges106 silver badges240 bronze badges

answered Aug 19, 2015 at 20:43

Saman's user avatar

SamanSaman

3712 gold badges5 silver badges13 bronze badges

I’m writing a script that downloads various releases using ‘debootstrap’ and installs some necessary packages on it (including locales), then packages it for use in another script.

I get the following error when running the command inside the chroot:

# locale-gen en_US.UTF-8;update-locale LANG=en_US.UTF-8
Generating locales (this might take a while)...
Generation complete.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        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_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
*** update-locale: Error: invalid locale settings:  LANG=en_US.UTF-8

When I run «export LANG=’en_US.UTF-8′» it reports no errors, but it does not fix any issues.

So the question is, how can I fix these locales errors?

PS: I can post part of the script source if it would help.

asked May 27, 2013 at 1:02

ionFish's user avatar

I’m afraid that you are calling locale-gen wrong — locale-gen does not take locales as parameters. You need to specify all locales for your system in /etc/locale.gen, the call locale-gen once to generate them all for you.

EDIT: The /etc/locale.gen was the file I set when using Debian. I’m using Ubuntu now, and the configuration file is /var/lib/locales/supported.d/local. Check your locale-gen man page to make sure.

answered May 27, 2013 at 3:11

xpt's user avatar

xptxpt

7,88137 gold badges94 silver badges146 bronze badges

8

  • Печать

Страницы: [1]   Вниз

Тема: Обновление 11.10 to 12.04 LTS  (Прочитано 2573 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
kdX

всем привет!

ноутбук dell vostro 1500,была рабочая система, менеджер обновлений предложил обновить дитрибутив до свежей версии 12.04. ну думаю, надо идти в ногу со временем, обновил… и понеслось.  >:(

русский язык исчез(и раскладка и язык меню), комп перестал выключаться — нажимаешь выкл, система размонировает диски, выключает монитор, но компьютер продолжает работать, flash player виснит, не раз комьютер вылетает при просмотре алфыр в файрфокс, при использовании alt-shift комп зависает напрочь….

подскажите как исправить эти глюки? и вообще стоит ли тогда ставить так обновления раз это приводит к таким последствия?

в первую очередь хотелось бы исправить ситуацию с локалью. через настройку систему переустановил язык, сейчас раскладка клавиатуры работает, а вот в меню всё на англ, в консоле вместо русских букв вопросительные знаки :(

??vova@home:~$ locale
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
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en
LC_CTYPE=»en_AU.UTF-8″
LC_NUMERIC=ru_RU.UTF-8
LC_TIME=ru_RU.UTF-8
LC_COLLATE=»en_AU.UTF-8″
LC_MONETARY=ru_RU.UTF-8
LC_MESSAGES=»en_AU.UTF-8″
LC_PAPER=ru_RU.UTF-8
LC_NAME=ru_RU.UTF-8
LC_ADDRESS=ru_RU.UTF-8
LC_TELEPHONE=ru_RU.UTF-8
LC_MEASUREMENT=ru_RU.UTF-8
LC_IDENTIFICATION=ru_RU.UTF-8
LC_ALL=


Оффлайн
v!tax

господь ведет твою руку, сын мой….


Оффлайн
kdX

спасибо, но как делать чтобы было ru_RU ??

vova@home:~$ sudo locale-gen
Generating locales…
  en_US.UTF-8… done
  ru_RU.CP1251… done
  ru_RU.UTF-8… up-to-date
  ru_UA.UTF-8… up-to-date

vova@home:~$ sudo update-locale LANG=ru_RU     
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
   LANGUAGE = «en_AU:en»,
   LC_ALL = (unset),
   LC_PAPER = «ru_RU.UTF-8»,
   LC_ADDRESS = «ru_RU.UTF-8»,
   LC_MONETARY = «ru_RU.UTF-8»,
   LC_NUMERIC = «ru_RU.UTF-8»,
   LC_TELEPHONE = «ru_RU.UTF-8»,
   LC_IDENTIFICATION = «ru_RU.UTF-8»,
   LC_MEASUREMENT = «ru_RU.UTF-8»,
   LC_TIME = «ru_RU.UTF-8»,
   LC_NAME = «ru_RU.UTF-8»,
   LANG = «en_AU.UTF-8»
    are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
*** update-locale: Error: invalid locale settings:  LC_TELEPHONE=»ru_RU.UTF-8″ LC_MONETARY=»ru_RU.UTF-8″ LC_ADDRESS=»ru_RU.UTF-8″ LC_PAPER=»ru_RU.UTF-8″ LC_NAME=»ru_RU.UTF-8″ LC_NUMERIC=»ru_RU.UTF-8″ LC_MEASUREMENT=»ru_RU.UTF-8″ LC_TIME=»ru_RU.UTF-8″ LANG=ru_RU LC_IDENTIFICATION=»ru_RU.UTF-8″
vova@home:~$ sudo update-locale LANG=ru_RU.utf8^C


Оффлайн
Сперанский

Попробуйте сделать

sudo mv /home/<имя_пользователя> /home/<имя пользователя>.bakи перелогиньтесь, проверим проблема в системе или в настройках профиля.
А Параметры системы-Язык пробовали открывать? Система сама предложит доустановить локаль, если есть проблемы.


Оффлайн
kdX

под гостевой учёткой всё на русском :( так…


Пользователь решил продолжить мысль 03 Июня 2012, 21:04:09:


создал пользователя с нуля…. и опять всё на английском :(

« Последнее редактирование: 03 Июня 2012, 21:04:09 от kdX »


Оффлайн
victor00000

echo 'LANG="ru_RU.UTF-8"' | sudo tee -a /etc/environment
sudo reboot
?


Оффлайн
kdX

к сожаление ничего не дало :(

lovova@home:~$ locale
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
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en
LC_CTYPE=»en_AU.UTF-8″
LC_NUMERIC=ru_RU.UTF-8
LC_TIME=ru_RU.UTF-8
LC_COLLATE=»en_AU.UTF-8″
LC_MONETARY=ru_RU.UTF-8
LC_MESSAGES=»en_AU.UTF-8″
LC_PAPER=ru_RU.UTF-8
LC_NAME=ru_RU.UTF-8
LC_ADDRESS=ru_RU.UTF-8
LC_TELEPHONE=ru_RU.UTF-8
LC_MEASUREMENT=ru_RU.UTF-8
LC_IDENTIFICATION=ru_RU.UTF-8
LC_ALL=

 настройки локали

 :idiot2:

Руководство по добавлению изображений на форум

—Пупизоид

« Последнее редактирование: 05 Июня 2012, 09:02:17 от truegeek »


Оффлайн
v!tax

sudo gedit /etc/default/localeтам меняешь,что нужно на ru_RU.UTF-8

господь ведет твою руку, сын мой….


Оффлайн
kdX

« Последнее редактирование: 05 Июня 2012, 09:02:30 от truegeek »


Оффлайн
v!tax

locale-gen
попробуй еще раз

господь ведет твою руку, сын мой….


Оффлайн
victor00000

а может

sudo apt-get upgrade
sudo apt-get install -f
?


Оффлайн
kdX

vova@home:~$ locale-gen
Generating locales…
  en_US.UTF-8… up-to-date
  ru_RU.CP1251… up-to-date
  ru_RU.UTF-8… up-to-date
  ru_UA.UTF-8… up-to-date
Generation complete.


Пользователь решил продолжить мысль 03 Июня 2012, 21:42:41:


а можетsudo apt-get upgrade
sudo apt-get install -f
?

vova@home:~$ sudo apt-get upgrade
Reading package lists… Done
Building dependency tree       
Reading state information… Done
The following packages have been kept back:
  ibus-hangul nabi
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
vova@home:~$ sudo apt-get install -f
Reading package lists… Done
Building dependency tree       
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
vova@home:~$ sudo apt-get upgrade
Reading package lists… Done
Building dependency tree       
Reading state information… Done
The following packages have been kept back:
  ibus-hangul nabi
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.


Пользователь решил продолжить мысль 03 Июня 2012, 22:27:40:


максимум что получилось сделать это, все программы, типа firefox, LibreOffice стали на русском, однако весь интерфейс системы остался на английском.

меняю файл locale и environment и после перезагрузки появляется новая строка LANGUAGE=»en_AU:en»  может в 12.04 это строка для русского языка звучит иначе LANGRUGE=»ru_RU»

LANG=»ru_RU.UTF-8″
LANGRUGE=»ru_RU»
LC_CTYPE=»ru_RU.UTF-8″
LC_NUMERIC=»ru_RU.UTF-8″
LC_TIME=»ru_RU.UTF-8″
LC_COLLATE=»ru_RU.UTF-8″
LC_MONETARY=»ru_RU.UTF-8″
LC_MESSAGES=»ru_RU.UTF-8″
LC_PAPER=»ru_RU.UTF-8″
LC_NAME=»ru_RU.UTF-8″
LC_ADDRESS=»ru_RU.UTF-8″
LC_TELEPHONE=»ru_RU.UTF-8″
LC_MEASUREMENT=»ru_RU.UTF-8″
LC_IDENTIFICATION=»ru_RU.UTF-8″
LC_ALL=
LANGUAGE=»en_AU:en»


Пользователь решил продолжить мысль 03 Июня 2012, 22:38:05:


:2funny: вообщем появилась какая-то ясность, в слове language была ошибка, исправил сейчас ничего после перезагрузки не добавляется… и создал нового пользователя, там всё на русском. проблема осталась в текущей учётке.

что надо почистить чтобы всё встало на свои месте?  :coolsmiley:

« Последнее редактирование: 03 Июня 2012, 22:38:05 от kdX »


Оффлайн
kohmab

Была аналогичная проблема. Нужно элементарно зайти в настройки учетных записей и там поставить русский язык


  • Печать

Страницы: [1]   Вверх

I had this problem which was very bothering and spamming the terminal window.
Main issue, that my client is MacOS box. See below.

As I have seen, all the solutions are locales package and settings related, but the root cause is SSH!

Remote Linux server, fresh installed Debian Buster complains:

locale
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
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE=UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

I connect to remote systems from MacOS Terminal, which has setting:

uname -a
Darwin mac-pro.lan 19.6.0 Darwin Kernel Version 19.6.0: Tue Nov 10 00:10:30 PST 2020; root:xnu-6153.141.10~1/RELEASE_X86_64 x86_64

set | grep LC_
LC_CTYPE=UTF-8

Here it is! Local, non Linux standard language setting is passed to remote Linux server.

On remote Linux server edit the /etc/ssh/sshd_config and comment out the LC_ variable passthrough:

# Allow client to pass locale environment variables
#AcceptEnv LANG LC_*

Restart the ssh daemon:

systemctl restart sshd 

logout from remote ssh, login again, and vualia:

locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Not to bother with every single server, just fix your (MacOS client) side:

echo "export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8">>~/.bash_profile

if you use zsh use ~/.zprofile instead.

This way, you setup more Linux compatible language setting, and no more remote Linux server complains!

Понравилась статья? Поделить с друзьями:
  • Unregistering runner from gitlab error status only http or https scheme supported
  • Update google play services как исправить ошибку
  • Unreal engine 4 packagingresults error unknown error
  • Unregistered on api console как исправить
  • Update google play services как исправить на андроид