Debianテストマスターにgdal-binパッケージをインストールした後、apt-get autoremoveはロケールを混乱させます。

Debianテストマスターにgdal-binパッケージをインストールした後、apt-get autoremoveはロケールを混乱させます。

gdal-bin次のDockerfileでDebianの不安定パッケージを更新しようとしています。

FROM postgis/postgis:15-master

RUN echo 'deb http://deb.debian.org/debian testing main' >> /etc/apt/sources.list \
  && apt-get -y update \
  && DEBIAN_FRONTEND=noninteractive \
     apt-get -y install \
       --fix-missing \
       --no-install-recommends gdal-bin \
  && apt-get -y autoremove --purge

ただし、この場合、apt-get autoremoveロケールは混乱します(このイメージからコンテナを起動しようとすると、データベースの初期化が中断されます)。

(...)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  libaom0* libdav1d4* libgeos-3.9.0* libx265-192*
0 upgraded, 0 newly installed, 4 to remove and 134 not upgraded.
After this operation, 24.3 MB disk space will be freed.
Do you want to continue? [Y/n] y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_US.utf8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

問題は何ですか?どうすれば解決できますか?

以下はいくつかの便利なリンクです:

ベストアンサー1

この警告(エラーではない)en_US.UTF-8は、システムにまだ構成されていないことを意味し、Perlスクリプトが実行されるとPerlが警告を発行します。

Dockerfileに以下を追加してみてください。

RUN /sbin/locale-gen

にリストされているすべてのロケールに必要なファイルを生成します/etc/locale.gen

おすすめ記事