サービスの開始や停止などの操作をするたびに、このメッセージが表示されます。
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_MESSAGES = "en_US.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
(Reading database ... 21173 files and directories currently installed.)
Removing bind9 ...
* Stopping domain name service... bind9 [ OK ]
Processing triggers for man-db ...
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
どうすればこのエラーを修正できますか?
まず、locale
を実行して、現在のユーザーアカウントで定義されているロケールをリストアップします。
$ locale
LANG=C
LANGUAGE=
LC_CTYPE=fi_FI.UTF-8
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE=fi_FI.UTF-8
LC_MONETARY="C"
LC_MESSAGES=fi_FI.UTF-8
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
その後、不足しているロケールを生成し、ロケールを再設定して注意を促します。
$ sudo locale-gen "en_US.UTF-8"
Generating locales...
en_US.UTF-8... done
Generation complete.
$ sudo dpkg-reconfigure locales
Generating locales...
en_US.UTF-8... up-to-date
Generation complete.
これで、エラーが出なくなりました
発行後は消えているはずです。
sudo locale-gen en_US en_US.UTF-8
sudo dpkg-reconfigure locales
dpkg-reconfigure
は、すでにインストールされた後のパッケージを再構成します。
再構成します。再構成したいパッケージの名前を渡してください。
パッケージが最初にインストールされたときのように、設定に関する質問が行われます。
パッケージを最初にインストールしたときのように、設定に関する質問をします。