当前位置:操作系统 > Unix/Linux >>

在debian下安装local的问题

在debian下安装程序时,有时候会因为本地设置没有设置好,Per会给出下面的错误提示:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "zh_CN.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

要解决这个问题,其实很简单,只要执行下面几条命令,一切都会OK:

debian:~# apt-get install locales
debian:~# dpkg-reconfigure locales
debian:~# locale

[page_break]下面是我执行这几条命令的显示(粗体部分是命令行):

debian:~# apt-get install locales
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  locales
0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded.
Need to get 3967kB of archives.
After unpacking 9612kB of additional disk space will be used.
Get:1 http://debian.cn99.com stable/main locales 2.3.6.ds1-13etch2 [3967kB]
Fetched 3967kB in 1s (3106kB/s)  
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "zh_CN.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Preconfiguring packages ...
Selecting previously deselected package locales.
(Reading database ... 9213 files and directories currently installed.)
Unpacking locales (from .../locales_2.3.6.ds1-13etch2_all.deb) ...
Setting up locales (2.3.6.ds1-13etch2) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "zh_CN.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
debian:~# dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "zh_CN.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
  en_US.ISO-8859-1... done
  en_US.ISO-8859-15... done
  en_US.UTF-8... done
  zh_CN.GB2312... done
  zh_CN.GB18030... done
  zh_CN.GBK... done
  zh_CN.UTF-8... done
  zh_HK.BIG5-HKSCS... done
  zh_HK.UTF-8... done
  zh_SG.GB2312... done
  zh_SG.GBK... done
  zh_SG.UTF-8... done
  zh_TW.BIG5... done
  zh_TW.EUC-TW... done
  zh_TW.UTF-8... done
  zu_ZA.ISO-8859-1... done
  zu_ZA.UTF-8... done
Generation complete.
debian:~# locale
LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=
debian:~#

在执行第二条命令时,按照提示,选择你想要的local就OK了。
第三条命令是用来查看都安装了哪些local。
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,