分类: LINUX
2013-04-12 16:01:35
参考这两篇文章:文章一 文章二现象:
运行apt-get命令更新或安装软件出现下列类似提示:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
解决方法:
1、配置想要的locale
cp /user/share/i18n/SUPPORTED /var/lib/locales/supported.d/local
打开/var/lib/locales/supported.d/local文件,将其中除了en_*和zh_*之外的值都删掉,然后
locale-gen --purge
2、使用locale命令,将输出的值:
$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.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=
拷贝到/etc/environment文件中即可。