본문 바로가기

리눅스

CentOS 7 locale(로케일) 에러 해결

반응형

CentOS 7 locale(로케일) 에러 해결

ssh bvm-server02

s1

-bash: warning: setlocale: LC_CTYPE: cannot change locale (ko_KR.UTF-8)

 

cat /etc/local
$ cat /etc/local
LANG=en_US.utf-8

 

vim /etc/locale.conf
LANG=ko_KR.UTF-8


현재 시스템에서 사용중인 로케일 확인

locale
$ locale
locale: Cannot set LC_CTYPE 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
LC_CTYPE=ko_KR.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
$ ssh bvm-server02
Last login: Thu Dec 12 16:06:53 2019 from 10.211.3.192
-bash: warning: setlocale: LC_CTYPE: cannot change locale (ko_KR.UTF-8)
-bash: warning: setlocale: LC_COLLATE: cannot change locale (ko_KR.UTF-8): No such file or directory
-bash: warning: setlocale: LC_MESSAGES: cannot change locale (ko_KR.UTF-8): No such file or directory
-bash: warning: setlocale: LC_NUMERIC: cannot change locale (ko_KR.UTF-8): No such file or directory
-bash: warning: setlocale: LC_TIME: cannot change locale (ko_KR.UTF-8): No such file or directory
728x90


라이브러리가 추가

yum install -y glibc-common glibc

 

localectl list-locales | grep -i ko
$ localectl list-locales | grep -i ko
ko_KR
ko_KR.euckr
ko_KR.utf8
kok_IN
kok_IN.utf8
korean
korean.euc
ru_RU.koi8r
ru_UA.koi8u
tg_TJ.koi8t
uk_UA.koi8u

 

locale
$ locale
LANG=ko_KR.UTF-8
LC_CTYPE=ko_KR.UTF-8
LC_NUMERIC="ko_KR.UTF-8"
LC_TIME="ko_KR.UTF-8"
LC_COLLATE="ko_KR.UTF-8"
LC_MONETARY="ko_KR.UTF-8"
LC_MESSAGES="ko_KR.UTF-8"
LC_PAPER="ko_KR.UTF-8"
LC_NAME="ko_KR.UTF-8"
LC_ADDRESS="ko_KR.UTF-8"
LC_TELEPHONE="ko_KR.UTF-8"
LC_MEASUREMENT="ko_KR.UTF-8"
LC_IDENTIFICATION="ko_KR.UTF-8"
LC_ALL=

 

참고URL
- blog.seotory.com : https://blog.seotory.com/post/2017/02/docker-container-locate-error-fix
- MY TISTORY : centos 접근시 발생할 수 있는 문제 - line 19: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

 

728x90
반응형