문제 ν•΄κ²°

Step1: error check

root@2d1e0b4d517a:/etc/default# cat /etc/issue
Ubuntu 16.04.7 LTS \n \l
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/namin.py", line 4112, in setlocale
    return _setlocale(categories, locale)
locale.Error: unsupported locale setting
  • Dockerν™˜κ²½μ—μ„œ Ubuntu μ„œλ²„λ₯Ό μš΄μ˜ν•˜λ‹€κ°€ pip -install 이 μž‘λ™μ„ μ•ˆν•˜λŠ” κ²½μš°κ°€ 생긴닀.
  • ν•΄λ‹Ή μ—λŸ¬λŠ” locale.Error: unsupported locale setting κ°€ λ°œμƒν•˜λ©° local μͺ½μ— λ¬Έμ œκ°€ 생긴 κ²ƒμœΌλ‘œ 보인닀.

Step2

$ 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
LANGUAGE=
LC_CTYPE=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=

$ locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
C
C.UTF-8
en_US.utf8
POSIX
  • locale -a λͺ…λ ΉμœΌλ‘œ ν•΄λ‹Ή νŒŒμΌμ„ 찾을 수 μ—†λ‹€λŠ” 였λ₯˜ λ©”μ‹œμ§€κ°€ λœ¬λ‹€λ©΄μ€ μ•„λž˜μ— ν™˜κ²½ 섀정을 ν•΄μ£ΌκΈΈ λ°”λž€λ‹€.
/usr/sbin/dpkg-reconfigure: locales is not installed

# echo "LC_ALL=en_US.UTF-8" | tee -a /etc/environment
LC_ALL=en_US.UTF-8

# echo "en_US.UTF-8 UTF-8" | tee -a /etc/locale.gen
en_US.UTF-8 UTF-8

# echo "LANG=en_US.UTF-8" | tee -a /etc/locale.conf
LANG=en_US.UTF-8

Step3

  • ν™˜κ²½ 섀정을 μ™„λ£Œν•˜μ˜€μœΌλ©΄ dpkg-reconfigure μ˜΅μ…˜μœΌλ‘œ μ‚¬μš©ν•  locales λ₯Ό μ§€μ •ν•˜λ„λ‘ ν•œλ‹€.
# dpkg-reconfigure locales

./0.png

  • en_US.UTF-8 UTF-8 을 μ„ νƒν•˜κ³  en_US.UTF-8 을 μ„€μ •ν•˜λ„λ‘ ν•œλ‹€.

./1.png

  • κ·Έ 후에 pip install 이 μž˜λ˜λŠ” 것을 확인할 μˆ˜μžˆλ‹€.😊😊

./2.png