Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save almokhtarbr/9380bde3f46dbcb36b21f9930c09b06b to your computer and use it in GitHub Desktop.
Save almokhtarbr/9380bde3f46dbcb36b21f9930c09b06b to your computer and use it in GitHub Desktop.
How do I solve this problem?
To set i18n stuff CentOS/Fedora and RedHat Enterprise Linux call a special script called /etc/profile.d/lang.sh. Make sure this file exist in your system:
$ ls -l /etc/profile.d/lang.sh
If file exist just call it:
$ source /etc/profile.d/lang.sh
Verify that LANG and LC_* shell variable are set:
$ echo "$LANG"
$ echo "$LC_CTYPE"
How to set my own LANG and LC_ALL/LC_CTYPE variables
You can set it manually in your own directory as follows:
$ vi ~/.bashrc
OR globally in /etc/profile.d/ for bash/sh/ksh shell:
$ sudo vi /etc/profile.d/my-custom.lang.sh
Append the following
## Indian English ##
export LANG=en_IN
export LANGUAGE=en_IN:en
export LC_COLLATE=C
export LC_CTYPE=en_IN.UTF-8
For US English:
## US English ##
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_COLLATE=C
export LC_CTYPE=en_US.UTF-8
Save and close the file. Log out and log in again. Or just call this file:
$ source /etc/profile.d/my-custom.lang.sh
How do I test it?
Now you can use yum command without any issues:
$ sudo yum update
$ sudo yum search nload
$ sudo install nload
Sample outputs:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment