데비안 불스아이(v11)에서 겪고 있는 문제:
을 실행하면 locale -a
다음과 같은 결과가 출력됩니다.
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_COLLATE to default locale: No such file or directory
C
C.UTF-8
POSIX
aa_DJ
aa_DJ.iso88591
aa_DJ.utf8
aa_ER
aa_ER.utf8
...
zh_TW
zh_TW.big5
zh_TW.euctw
zh_TW.utf8
zu_ZA
zu_ZA.iso88591
zu_ZA.utf8
또한 (LateX의 패키지 관리자)를 사용하려고 하면 tlmgr
다음과 같은 결과가 나타납니다.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:fr:en_GB",
LC_ALL = "en-US.UTF-8",
LC_MESSAGES = "en_US.UTF-8",
LC_CTYPE = "en_US.UTF-8",
LC_COLLATE = "en_US.UTF-8",
LANG = "fr_FR.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("fr_FR.UTF-8").
tlmgr: no action given; try --help if you need it.
이 문제를 검색하고 다음을 시도했습니다.
dpkg-reconfigure locales
사용된 로캘(fr utf8, en-us utf8 및 en-gb utf8)만 선택하세요.dpkg-reconfigure locales
모든 로케일을 선택합니다(위에 표시됨).locale-gen
- 각 변경 후에 컴퓨터를 다시 시작하십시오.
- /etc/default/locale 편집
추가 정보
cat /etc/default/locale
다음을 제공합니다:
# File generated by update-locale
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_COLLATE=en_US.UTF-8
ls /usr/share/locale/en
다음을 제공합니다:
LC_MESSAGES
ls /usr/share/locale/en/LC_MESSAGES
다음을 제공합니다:
accounts-service.mo gtk30-properties.mo iso_3166-2.mo kcoreaddons5_qt.qm kwidgetsaddons5_qt.qm
cups-pk-helper.mo gtk30.mo
질문
- 로케일을 재구성하고 사용된 로케일만 선택해야 합니까?
- 오류 메시지는 존재하지 않는 파일/폴더가 필요하다는 것을 나타냅니다. 이 파일/폴더는 어디에 위치해야 합니까? 존재하다
/usr/share/locale/en
? - 이 문제를 해결하는 방법(모든 앱이 작동하는 것처럼 보이지만 차단되지 않음)
이 문제를 더 깊이 조사하기 위해 문서를 읽어보라는 제안이 있으면 저도 경청하겠습니다.
감사해요.
편집하다
@StéphaneChazelas의 질문
산출locale
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
LANG=fr_FR.UTF-8
LANGUAGE=en_US:fr:en_GB
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=en-US.UTF-8
출력 strace locale 2>&1 | grep ENOENT
:
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en-US.UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en-US.utf8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en-US/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en-US.UTF-8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en-US.utf8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en-US/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en-US.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en-US.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en-US/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
ls /usr/lib/locale
다음을 제공합니다:
C.UTF-8
locale-archive
이상한 dpkg-reconfigure 로케일 출력
내 기억이 정확하다면 dpkg-reconfigure locales
로케일이 나열되어야 하며 생성된 경우 각 로케일에 대해 "최신"이라고 표시되어야 합니다. 하지만 내 경우에는 각 로케일을 다시 처리하고 "완료"라고 표시됩니다.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:fr:en_GB",
LC_ALL = "en-US.UTF-8",
LC_MESSAGES = "en_US.UTF-8",
LC_CTYPE = "en_US.UTF-8",
LC_COLLATE = "en_US.UTF-8",
LANG = "fr_FR.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("fr_FR.UTF-8").
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)...
aa_DJ.UTF-8... done
aa_DJ.ISO-8859-1... done
aa_ER.UTF-8... done
aa_ER.UTF-8@saaho... done
aa_ET.UTF-8... done
af_ZA.UTF-8... done
af_ZA.ISO-8859-1... done
agr_PE.UTF-8... done
ak_GH.UTF-8... done
am_ET.UTF-8... done
an_ES.UTF-8... done
an_ES.ISO-8859-15... done
anp_IN.UTF-8... done
ar_AE.UTF-8... done
ar_AE.ISO-8859-6... done
ar_BH.UTF-8... done
ar_BH.ISO-8859-6... done
ar_DZ.UTF-8... done
ar_DZ.ISO-8859-6... done
ar_EG.UTF-8... done
ar_EG.ISO-8859-6... done
ar_IN.UTF-8... done
ar_IQ.UTF-8... done
...
@K-att- 님의 질문입니다.
dpkg -l | grep "language-pack"
아무것도 반환하지 않습니다.
@ThatsWhatSheCoded의 질문
sudo apt-get install -y locales locales-all
:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
locales is already the newest version (2.31-13+deb11u2).
The following NEW packages will be installed:
locales-all
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 10.8 MB of archives.
After this operation, 227 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 locales-all amd64 2.31-13+deb11u2 [10.8 MB]
Fetched 10.8 MB in 21s (515 kB/s)
apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_GB:en_US:fr",
LC_ALL = "en-US.UTF-8",
LC_CTYPE = "en_US.UTF-8",
LC_COLLATE = "en_US.UTF-8",
LC_MESSAGES = "en_US.UTF-8",
LANG = "fr_FR.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("fr_FR.UTF-8").
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
Selecting previously unselected package locales-all.
(Reading database ... 182206 files and directories currently installed.)
Preparing to unpack .../locales-all_2.31-13+deb11u2_amd64.deb ...
Unpacking locales-all (2.31-13+deb11u2) ...
Setting up locales-all (2.31-13+deb11u2) ...
다시 시작한 후에도 locale -a
여전히 다음이 제공됩니다.
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_COLLATE to default locale: No such file or directory
...
env
재설치 후 인쇄locales
실행: sudo apt-get remove locale
, 그런 sudo apt-get install -y locales
다음 env
:
SHELL=/bin/bash
WINDOWID=79691783
QT_ACCESSIBILITY=1
KDED_STARTED_BY_KDEINIT=1
COLORTERM=truecolor
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
LANGUAGE=en_GB:en_US:fr
SSH_AUTH_SOCK=/tmp/ssh-eAB2uCmvHnDY/agent.872
SHELL_SESSION_ID=08a2a2b1e969432881e34e2775568d69
DESKTOP_SESSION=plasma
SSH_AGENT_PID=911
GTK_RC_FILES=/etc/gtk/gtkrc:/home/nkoniishvt/.gtkrc:/home/nkoniishvt/.config/gtkrc
XCURSOR_SIZE=24
GTK_MODULES=gail:atk-bridge
XDG_SEAT=seat0
PWD=/home/nkoniishvt
XDG_SESSION_DESKTOP=KDE
LOGNAME=nkoniishvt
XDG_SESSION_TYPE=x11
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
XAUTHORITY=/home/nkoniishvt/.Xauthority
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/nkoniishvt/.gtkrc-2.0:/home/nkoniishvt/.config/gtkrc-2.0
HOME=/home/nkoniishvt
LANG=fr_FR.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
XDG_CURRENT_DESKTOP=KDE
KONSOLE_DBUS_SERVICE=:1.63
KONSOLE_DBUS_SESSION=/Sessions/1
PROFILEHOME=
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
KONSOLE_VERSION=201203
KDE_SESSION_UID=1000
XDG_SESSION_CLASS=user
TERM=xterm-256color
USER=nkoniishvt
COLORFGBG=15;0
KDE_SESSION_VERSION=5
PAM_KWALLET5_LOGIN=/run/user/1000/kwallet5.socket
DISPLAY=:0
SHLVL=1
LC_MESSAGES=en_US.UTF-8
XDG_VTNR=7
XDG_SESSION_ID=3
LC_CTYPE=en_US.UTF-8
XDG_RUNTIME_DIR=/run/user/1000
LC_ALL=en-US.UTF-8
QT_AUTO_SCREEN_SCALE_FACTOR=0
LC_COLLATE=en_US.UTF-8
XCURSOR_THEME=breeze_cursors
KDE_FULL_SESSION=true
PATH=/home/nkoniishvt/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
KDE_APPLICATIONS_AS_SCOPE=1
KONSOLE_DBUS_WINDOW=/Windows/1
_=/usr/bin/env
답변1
export LANGUAGE=en_GB:en_US:fr
.bashrc
그런 다음 실행 에서 제거하십시오 dpkg-reconfigure locales
.