Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Locale Error in centos

Tags:

Every time I login to my CentOS 6 server through SSH I get this error

Can anyone please explain what does that error mean & how to fix?

-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
like image 959
Seif Hatem Avatar asked Mar 15 '14 22:03

Seif Hatem


People also ask

How do I fix locale error?

One solution to fix this issue, first run the locale command to list the locales currently defined for your user account. To generate the missing locale and reconfigure locales, identify the name of your locale ( in my case de_DE. UTF-8 ), or use one another one that you prefer, such as en_US. UTF-8 .

What is locale on Linux?

Locale is basically a set of environmental variables that defines the user's language, region, and any special variant preferences that the user wants to see in their Linux interface. System libraries and locale-aware applications on the system use these environmental variables.

Where is locale Linux?

You can find global locale settings in the following files: /etc/default/locale – on Ubuntu/Debian. /etc/locale.


1 Answers

The Fix: Thanks for Millie Smith (https://stackoverflow.com/users/2850543/millie-smith) & http://linuxforums.org.uk/index.php?topic=10318.0

Using root user through ssh

Run these commands

vi /etc/environment

& add these lines:

LANG=en_US.utf-8
LC_ALL=en_US.utf-8
like image 162
Seif Hatem Avatar answered Sep 28 '22 03:09

Seif Hatem