Sunday, August 15, 2010

Fix perl setting locale failed

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "iso_8859_1",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

使用以下指定設定環境變數,並且安裝 locale files
$ export LANGUAGE=en_US.UTF-8
$ export LC_ALL=en_US.UTF-8
$ export LANG=en_US.UTF-8
$ sudo locale-gen en_US.UTF-8
$ sudo dpkg-reconfigure locales

No comments:

Post a Comment