แก้ปัญหา update ubuntu server แล้วแจ้ง error ว่า perl: warning: Setting locale failed.

update Ubuntu Server แล้วมี error message แจ้งดังนี้

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_TIME = "th_TH.UTF-8",
LC_MONETARY = "th_TH.UTF-8",
LC_ADDRESS = "th_TH.UTF-8",
LC_TELEPHONE = "th_TH.UTF-8",
LC_NAME = "th_TH.UTF-8",
LC_MEASUREMENT = "th_TH.UTF-8",
LC_IDENTIFICATION = "th_TH.UTF-8",
LC_NUMERIC = "th_TH.UTF-8",
LC_PAPER = "th_TH.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.

แก้โดย ใช้คำสั่ง locale-gen ตัวอย่าง
sudo locale-gen en_US en_US.UTF-8 th_TH th_TH.UTF-8

ผลลัพธ์
$ sudo locale-gen en_US en_US.UTF-8 th_TH th_TH.UTF-8
Generating locales…
en_US.ISO-8859-1… done
en_US.UTF-8… up-to-date
th_TH.TIS-620… done
th_TH.UTF-8… done
Generation complete.

ต่อด้วยคำสั่ง
sudo dpkg-reconfigure locales

ผลลัพธ์
$ sudo dpkg-reconfigure locales
Generating locales…
en_US.ISO-8859-1… up-to-date
en_US.UTF-8… up-to-date
th_TH.TIS-620… up-to-date
th_TH.UTF-8… up-to-date
Generation complete.

ก็จะแก้ปัญหา error message ดังกล่าวให้หายไปได้

ที่มา:
http://ubuntuforums.org/showthread.php?t=1346581

Leave a Reply