로케일을 설치할 수 없습니다. [닫기]

로케일을 설치할 수 없습니다. [닫기]

저는 Raspbian(RaspberryPi용)에서 작업하고 있습니다.

Linux 버전 3.18.14-v7+ (root@vagrant-ubuntu-trusty-32) (gcc 버전 4.8.3 20140106(시험판) (crosstool-NG linaro-1.13.1-4.8-2014.01 - Linaro GCC 2013.11) )

참고: 저는 SSH 세션을 사용하여 노트북에서 파이에 연결하고 있습니다.

여기서 이 문제를 해결하려고 할 때: Perl 수정 방법: 경고: 로컬 설정 실패

난 달린다

sudo dpkg-reconfigure locales

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US.UTF-8",
        LC_ALL = "en_US.UTF-8",
        LC_PAPER = "fr_FR.UTF-8",
        LC_ADDRESS = "fr_FR.UTF-8",
        LC_MONETARY = "fr_FR.UTF-8",
        LC_NUMERIC = "fr_FR.UTF-8",
        LC_TELEPHONE = "fr_FR.UTF-8",
        LC_IDENTIFICATION = "fr_FR.UTF-8",
        LC_MEASUREMENT = "fr_FR.UTF-8",
        LC_TIME = "fr_FR.UTF-8",
        LC_NAME = "fr_FR.UTF-8",
        LANG = "en_US.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
dpkg-query: package 'locales' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
/usr/sbin/dpkg-reconfigure: locales is not installed

로캘이 설치되지 않았으므로 이 명령을 실행하여 로캘을 설치합니다.

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:
 apache2-mpm-prefork : Depends: apache2.2-bin (= 2.2.22-13+deb7u5) but it is not going to be installed
 apache2.2-common : Depends: apache2.2-bin (= 2.2.22-13+deb7u5) but it is not going to be installed
                    Depends: apache2-utils but it is not going to be installed
                    Depends: procps but it is not going to be installed
                    Depends: perl but it is not going to be installed
                    Recommends: ssl-cert but it is not going to be installed
 libbz2-1.0 : PreDepends: multiarch-support but it is not going to be installed
 libc6 : Breaks: locales (< 2.19)
 libcomerr2 : PreDepends: multiarch-support but it is not going to be installed
 libdb5.1 : PreDepends: multiarch-support but it is not going to be installed
 libgcc1 : PreDepends: multiarch-support but it is not going to be installed
 libgssapi-krb5-2 : Depends: libkeyutils1 (>= 1.4) but it is not going to be installed
                    Depends: libkrb5support0 (>= 1.12~alpha1+dfsg) but it is not going to be installed
                    PreDepends: multiarch-support but it is not going to be installed
 libk5crypto3 : Depends: libkeyutils1 (>= 1.4) but it is not going to be installed
                Depends: libkrb5support0 (>= 1.12~alpha1+dfsg) but it is not going to be installed
                PreDepends: multiarch-support but it is not going to be installed
 libkrb5-3 : Depends: libkeyutils1 (>= 1.5.9) but it is not going to be installed
             Depends: libkrb5support0 (= 1.12.1+dfsg-19) but it is not going to be installed
             PreDepends: multiarch-support but it is not going to be installed
 libmagic1 : PreDepends: multiarch-support but it is not going to be installed
 libpcre3 : PreDepends: multiarch-support but it is not going to be installed
 libssl1.0.0 : Depends: debconf (>= 0.5) but it is not going to be installed or
                        debconf-2.0
               PreDepends: multiarch-support but it is not going to be installed
 libxml2 : Depends: liblzma5 (>= 5.1.1alpha+20120614) but it is not going to be installed
           PreDepends: multiarch-support but it is not going to be installed
           Recommends: xml-core but it is not going to be installed
 locales : Depends: glibc-2.13-1
           Depends: debconf (>= 0.5) but it is not going to be installed or
                    debconf-2.0
 php5-common : Depends: sed (>= 4.1.1-1) but it is not going to be installed
               Depends: psmisc (>= 22.15-1~) but it is not going to be installed
               Depends: lsof but it is not going to be installed
               PreDepends: dpkg (>= 1.16.1~) but it is not going to be installed
 tzdata : Depends: debconf (>= 0.5) but it is not going to be installed or
                   debconf-2.0
 ucf : Depends: debconf (>= 1.5.19) but it is not going to be installed
       Depends: coreutils (>= 5.91) but it is not going to be installed
 zlib1g : PreDepends: multiarch-support but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

어떤 팁이 있나요?

답변1

이것이 내 문제에 대한 완전한 해결책입니다

  1. 로케일 설치
sudo vim /etc/apt/sources.list

-

deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb http://apt.adafruit.com/raspbian/ wheezy main

Wheezing을 Jesse로 변경

달리기

sudo apt-get update && sudo apt-get install locales

wheezy로 되돌리기(jessie를 wheezy로 변경)

sudo apt-get update

sudo dpkg-reconfigure locales

이제 내가 달리면

perl

다음 경고가 표시됩니다.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_PAPER = "fr_FR.UTF-8",
        LC_ADDRESS = "fr_FR.UTF-8",
        LC_MONETARY = "fr_FR.UTF-8",
        LC_NUMERIC = "fr_FR.UTF-8",
        LC_TELEPHONE = "fr_FR.UTF-8",
        LC_IDENTIFICATION = "fr_FR.UTF-8",
        LC_MEASUREMENT = "fr_FR.UTF-8",
        LC_TIME = "fr_FR.UTF-8",
        LC_NAME = "fr_FR.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
  1. fr_FR.UTF-8 및 en_US.UTF-8 생성

sudo nano/etc/locale.gen

다음 줄의 주석 처리를 해제합니다.

en_US.UTF-8
fr_FR.UTF-8

마지막 실행

sudo locale-gen

답변2

이것은 귀하가 연결하고 있는 서버로 openssh귀하의 정보를 보내는 매우 이상한 기본 설정입니다 . locale비표준(미국 이외의) 로캘이 있는 경우 유틸리티보다 더 많은 문제가 발생할 수 있습니다.

노트북의 라인을 제거하면 SendEnv LANG LC_*이 문제를 해결할 수 있습니다. /etc/ssh/ssh_configpi의 기본 로케일을 사용하므로 향후 SSH 세션에 대한 경고가 더 이상 트리거되지 않습니다.

관련 정보