Після встановлення CentOS 8 з англійською та українською, при виклику команди
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=uk_UA.UTF-8
LC_CTYPE="uk_UA.UTF-8"
LC_NUMERIC=uk_UA.UTF-8
LC_TIME=uk_UA.UTF-8
LC_COLLATE="uk_UA.UTF-8"
LC_MONETARY=uk_UA.UTF-8
LC_MESSAGES="uk_UA.UTF-8"
LC_PAPER=uk_UA.UTF-8
LC_NAME=uk_UA.UTF-8
LC_ADDRESS=uk_UA.UTF-8
LC_TELEPHONE=uk_UA.UTF-8
LC_MEASUREMENT=uk_UA.UTF-8
LC_IDENTIFICATION=uk_UA.UTF-8
LC_ALL=
Коли вказуємо
export LC_ALL="uk_UA.UTF-8"
отримуємо
bash: warning: setlocale: LC_ALL: cannot change locale (uk_UA.UTF-8)
bash: warning: setlocale: LC_ALL: cannot change locale (uk_UA.UTF-8)
Коли викликаємо
localectl list-locales | grep uk
Бачимо, що результат пустий, тобто немає локалі для uk_UA
Для виправлення встановлюємо
dnf install glibc-langpack-uk
Тепер для
localectl list-locales | grep uk
Отримуємо
uk_UA
uk_UA.utf8
А після виклику
locale
маємо
LANG=uk_UA.UTF-8
LC_CTYPE="uk_UA.UTF-8"
LC_NUMERIC="uk_UA.UTF-8"
LC_TIME="uk_UA.UTF-8"
LC_COLLATE="uk_UA.UTF-8"
LC_MONETARY="uk_UA.UTF-8"
LC_MESSAGES="uk_UA.UTF-8"
LC_PAPER="uk_UA.UTF-8"
LC_NAME="uk_UA.UTF-8"
LC_ADDRESS="uk_UA.UTF-8"
LC_TELEPHONE="uk_UA.UTF-8"
LC_MEASUREMENT="uk_UA.UTF-8"
LC_IDENTIFICATION="uk_UA.UTF-8"
LC_ALL=uk_UA.UTF-8
Для виклику
localectl
Отримуємо
System Locale: LANG=uk_UA.UTF-8
VC Keymap: us
X11 Layout: n/a
Поради і ідеї знайшов тут
https://unix.stackexchange.com/questions/439454/locale-issue-on-newly-centos-install
https://github.com/2creatives/vagrant-centos/issues/7
https://serveradmin.ru/centos-8-locale-for-language-ru_ru-is-not-found-on-the-server/
Коментарі
Дописати коментар