V
V
VA2017-08-21 18:23:14
System administration
VA, 2017-08-21 18:23:14

Locale error "warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)" CENTOS 6.7?

Mistake

"-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)"

can't install via yum installer
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Setting up Install Process
Determining fastest mirrors
epel/metalink                                                                                                                                                                    |  21 kB     00:00
Segmentation fault

Tried like this
localedef -i en_US -f UTF-8 en_US.UTF-8
Tried to add lines to /etc/environment file
:
LANG=en_US.utf-8
LC_ALL=en_US.utf-8

locale -a | grep US
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
en_US
en_US.iso88591
en_US.iso885915
en_US.utf8
es_US
es_US.iso88591
es_US.utf8
yi_US
yi_US.cp1255
yi_US.utf8

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
CityCat4, 2017-08-22
@CityCat4

Does /usr/share/locale exist?

J
jssputty, 2018-02-17
@jssputty

Add to /etc/locale.conf
LC_ALL=en_US.utf8
LC_CTYPE=en_US.utf8
LANG=en_US.utf8
And relogin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question