追加情報

追加情報

Debian ブルスアイ (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

関連情報