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
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 .
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.
You can find global locale settings in the following files: /etc/default/locale – on Ubuntu/Debian. /etc/locale.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With