Perl:警告:设置区域设置失败

Perl:警告:设置区域设置失败

我在 Ubuntu 14.04 LTS 中安装该工具并执行升级时遇到问题。请帮助我

    Fetched 6738 kB in 1min 19s (85.1 kB/s)                                        
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en",
    LC_ALL = "en_GB.UTF-8",
    LC_TIME = "id_ID.UTF-8",
    LC_MONETARY = "id_ID.UTF-8",
    LC_ADDRESS = "id_ID.UTF-8",
    LC_TELEPHONE = "id_ID.UTF-8",
    LC_NAME = "id_ID.UTF-8",
    LC_MEASUREMENT = "id_ID.UTF-8",
    LC_IDENTIFICATION = "id_ID.UTF-8",
    LC_NUMERIC = "id_ID.UTF-8",
    LC_PAPER = "id_ID.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^(.*?)(\\)?\${ <-- HERE ([^{}]+)}(.*)$/ at /usr/share/perl5/Debconf/Question.pm line 72.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^}]+)}/ at /usr/share/perl5/Debconf/Config.pm line 30.
Preconfiguring packages ...
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)


sudo apt-get install locales
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libc6 : Breaks: locales (< 2.22) but 2.13+git20120306-12.1 is to be installed
         Recommends: libc6-i686
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

sudo apt-get install libc6-i686
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libc6-i686 is a virtual package provided by:
  libc6 2.19-0ubuntu6.7 [Not candidate version]
  libc6 2.19-0ubuntu6 [Not candidate version]

E: Package 'libc6-i686' has no installation candidate

答案1

尝试:

locale-gen id_ID.UTF-8

但是,有些 PPA 可能无法安装,除非LC_ALL=C设置,例如PHP 的 PPA

相关内容