How to solve the error of "locale: cannot set LC_CTYPE to default locale: No such file or directory" and similar?
If you got this error, that means the environmental variable (in this case, it is LC_CTYPE) does not contain a reconganizable locale your system knows. This may be caused by two possibilities:
1. The locale you set to LC_CTYPE is misspelled;
2. The locale you specified is not installed in your system, in order to find out whether this is the case, do a
SmallBox:/etc# locale -a
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
C
POSIX
SmallBox:/etc# 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=en_US.UTF-8
LANGUAGE=en_ZA
LC_CTYPE="en_ZA"
LC_NUMERIC="en_ZA"
LC_TIME="en_ZA"
LC_COLLATE="en_ZA"
LC_MONETARY="en_ZA"
LC_MESSAGES="en_ZA"
LC_PAPER="en_ZA"
LC_NAME="en_ZA"
LC_ADDRESS="en_ZA"
LC_TELEPHONE="en_ZA"
LC_MEASUREMENT="en_ZA"
LC_IDENTIFICATION="en_ZA"
LC_ALL=en_ZA
heyunhuan:/etc# locale -a
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
C
POSIX
And see whether the locale you specified is contained in the output of that command. If it can not be found in the output, then you have to install that locale. Please refer to the doc about how to configure SCIM.
Step1. SmallBox:/etc# apt-get update
Step2. SmallBox:/etc# apt-get install locales
This problem will be solve!!!
Author: Small.Box
Time: 2008.07.02 08:49am
System: Debian /Linux Kernel 2.6.18
Address: Dalian China
If you got this error, that means the environmental variable (in this case, it is LC_CTYPE) does not contain a reconganizable locale your system knows. This may be caused by two possibilities:
1. The locale you set to LC_CTYPE is misspelled;
2. The locale you specified is not installed in your system, in order to find out whether this is the case, do a
SmallBox:/etc# locale -a
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
C
POSIX
SmallBox:/etc# 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=en_US.UTF-8
LANGUAGE=en_ZA
LC_CTYPE="en_ZA"
LC_NUMERIC="en_ZA"
LC_TIME="en_ZA"
LC_COLLATE="en_ZA"
LC_MONETARY="en_ZA"
LC_MESSAGES="en_ZA"
LC_PAPER="en_ZA"
LC_NAME="en_ZA"
LC_ADDRESS="en_ZA"
LC_TELEPHONE="en_ZA"
LC_MEASUREMENT="en_ZA"
LC_IDENTIFICATION="en_ZA"
LC_ALL=en_ZA
heyunhuan:/etc# locale -a
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
C
POSIX
And see whether the locale you specified is contained in the output of that command. If it can not be found in the output, then you have to install that locale. Please refer to the doc about how to configure SCIM.
Step1. SmallBox:/etc# apt-get update
Step2. SmallBox:/etc# apt-get install locales
This problem will be solve!!!
Author: Small.Box
Time: 2008.07.02 08:49am
System: Debian /Linux Kernel 2.6.18
Address: Dalian China