로캘이 재생성되는 것을 방지하는 방법은 무엇입니까?

로캘이 재생성되는 것을 방지하는 방법은 무엇입니까?

Debian을 실행하는 로컬 가상 머신에서 무언가를 시도해 보세요. 제가 자주 복구하는 스냅샷이 있습니다. 왔다 갔다 하면서 로케일을 재생성할 때 0이 아닌 경우를 겪었는데, 시간이 너무 오래 걸려서 죽일 수도 없습니다.

처음으로 참을성있게 기다렸습니다. 이제 이런 일이 다시는 발생하지 않게 하고 싶습니다. 이제 오픈했으니 cmn_TW.UTF-8...그것이 필요한 것은커녕 그것이 무엇인지조차 모릅니다. 그래도 나는 다시 앉아서 그들 각자를 기다려야 했다.

특히 이러한 서버를 설치할 때 구성하는 데 사용할 수 있는 스크립트에 넣을 수 있는 것이 필요합니다. 모두 Debian 11-12를 실행하지만 이는 Debian 8을 실행하는 기본 VM입니다(예).

일어난 일은 다음과 같습니다. (미안해요, 잘 안 됐어요.숨겨두세요.)

# apt-get install binutils=2.31.1-16
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  binutils-common binutils-x86-64-linux-gnu libbinutils libc-bin libc-dev-bin libc-l10n libc6 libc6-dev libidn2-0 libunistring2 locales
Suggested packages:
  binutils-doc glibc-doc
Recommended packages:
  manpages-dev
The following NEW packages will be installed:
  binutils-common binutils-x86-64-linux-gnu libbinutils libc-l10n libidn2-0 libunistring2
The following packages will be upgraded:
  binutils libc-bin libc-dev-bin libc6 libc6-dev locales
6 upgraded, 6 newly installed, 0 to remove and 395 not upgraded.
Need to get 16.4 MB of archives.
After this operation, 23.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.debian.org/debian/ buster/main libc-dev-bin amd64 2.28-10+deb10u1 [276 kB]
Get:2 http://archive.debian.org/debian/ buster/main binutils amd64 2.31.1-16 [56.8 kB]
Get:3 http://archive.debian.org/debian/ buster/main binutils-common amd64 2.31.1-16 [2073 kB]
Get:4 http://archive.debian.org/debian/ buster/main libbinutils amd64 2.31.1-16 [478 kB]
Get:5 http://archive.debian.org/debian/ buster/main binutils-x86-64-linux-gnu amd64 2.31.1-16 [1823 kB]
Get:6 http://archive.debian.org/debian/ buster/main libc6-dev amd64 2.28-10+deb10u1 [2692 kB]
Get:7 http://archive.debian.org/debian/ buster/main libc-l10n all 2.28-10+deb10u1 [847 kB]
Get:8 http://archive.debian.org/debian/ buster/main locales all 2.28-10+deb10u1 [4057 kB]
Get:9 https://packages.sury.org/php/ buster/main libidn2-0 amd64 2.2.0-2+0~20200302.4+debian10~1.gbpf85c2e [83.0 kB]
Get:10 http://archive.debian.org/debian/ buster/main libc6 amd64 2.28-10+deb10u1 [2863 kB]
Get:11 http://archive.debian.org/debian/ buster/main libc-bin amd64 2.28-10+deb10u1 [795 kB]
Get:12 http://archive.debian.org/debian/ buster/main libunistring2 amd64 0.9.10-1 [381 kB]
Fetched 16.4 MB in 1s (13.5 MB/s)   
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US:en",
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = (unset)
    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_ALL to default locale: No such file or directory
Preconfiguring packages ...
(Reading database ... 38740 files and directories currently installed.)
Preparing to unpack .../libc-dev-bin_2.28-10+deb10u1_amd64.deb ...
Unpacking libc-dev-bin (2.28-10+deb10u1) over (2.19-18+deb8u10) ...
Preparing to unpack .../binutils_2.31.1-16_amd64.deb ...
Unpacking binutils (2.31.1-16) over (2.25-5+deb8u1) ...
Selecting previously unselected package binutils-common:amd64.
Preparing to unpack .../binutils-common_2.31.1-16_amd64.deb ...
Unpacking binutils-common:amd64 (2.31.1-16) ...
Selecting previously unselected package libbinutils:amd64.
Preparing to unpack .../libbinutils_2.31.1-16_amd64.deb ...
Unpacking libbinutils:amd64 (2.31.1-16) ...
Selecting previously unselected package binutils-x86-64-linux-gnu.
Preparing to unpack .../binutils-x86-64-linux-gnu_2.31.1-16_amd64.deb ...
Unpacking binutils-x86-64-linux-gnu (2.31.1-16) ...
Preparing to unpack .../libc6-dev_2.28-10+deb10u1_amd64.deb ...
Unpacking libc6-dev:amd64 (2.28-10+deb10u1) over (2.19-18+deb8u10) ...
Preparing to unpack .../locales_2.28-10+deb10u1_all.deb ...
Unpacking locales (2.28-10+deb10u1) over (2.19-18+deb8u10) ...
Selecting previously unselected package libc-l10n.
Preparing to unpack .../libc-l10n_2.28-10+deb10u1_all.deb ...
Unpacking libc-l10n (2.28-10+deb10u1) ...
Preparing to unpack .../libc6_2.28-10+deb10u1_amd64.deb ...
head: cannot open '/lib/x86_64-linux-gnu/\033[01;31m\033[Kld-2.19.so\033[m\033[K' for reading: No such file or directory
head: cannot open '/lib/x86_64-linux-gnu/\033[01;31m\033[Klibc-2.19.so\033[m\033[K' for reading: No such file or directory
head: cannot open '/lib/x86_64-linux-gnu/\033[01;31m\033[Klibdl-2.19.so\033[m\033[K' for reading: No such file or directory
head: cannot open '/lib/x86_64-linux-gnu/\033[01;31m\033[Klibm-2.19.so\033[m\033[K' for reading: No such file or directory
head: cannot open '/lib/x86_64-linux-gnu/\033[01;31m\033[Klibpthread-2.19.so\033[m\033[K' for reading: No such file or directory
head: cannot open '/lib/x86_64-linux-gnu/\033[01;31m\033[Klibrt-2.19.so\033[m\033[K' for reading: No such file or directory
Checking for services that may need to be restarted...
Checking init scripts...
Unpacking libc6:amd64 (2.28-10+deb10u1) over (2.19-18+deb8u10) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for libc-bin (2.19-18+deb8u10) ...
Setting up libc6:amd64 (2.28-10+deb10u1) ...
Installing new version of config file /etc/ld.so.conf.d/x86_64-linux-gnu.conf ...
Checking for services that may need to be restarted...
Checking init scripts...
Nothing to restart.
Processing triggers for libc-bin (2.19-18+deb8u10) ...
(Reading database ... 38912 files and directories currently installed.)
Preparing to unpack .../libc-bin_2.28-10+deb10u1_amd64.deb ...
Unpacking libc-bin (2.28-10+deb10u1) over (2.19-18+deb8u10) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libc-bin (2.28-10+deb10u1) ...
Updating /etc/nsswitch.conf to current default.
Selecting previously unselected package libunistring2:amd64.
(Reading database ... 38910 files and directories currently installed.)
Preparing to unpack .../libunistring2_0.9.10-1_amd64.deb ...
Unpacking libunistring2:amd64 (0.9.10-1) ...
Selecting previously unselected package libidn2-0:amd64.
Preparing to unpack .../libidn2-0_2.2.0-2+0~20200302.4+debian10~1.gbpf85c2e_amd64.deb ...
Unpacking libidn2-0:amd64 (2.2.0-2+0~20200302.4+debian10~1.gbpf85c2e) ...
Processing triggers for libc-bin (2.28-10+deb10u1) ...
Setting up libc-dev-bin (2.28-10+deb10u1) ...
Setting up binutils-common:amd64 (2.31.1-16) ...
Setting up libbinutils:amd64 (2.31.1-16) ...
Setting up binutils-x86-64-linux-gnu (2.31.1-16) ...
Setting up binutils (2.31.1-16) ...
Setting up libc6-dev:amd64 (2.28-10+deb10u1) ...
Setting up libc-l10n (2.28-10+deb10u1) ...
Setting up locales (2.28-10+deb10u1) ...
Installing new version of config file /etc/locale.alias ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
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
...

locales패키지를 업그레이드하려는 모습이 보입니다 . 그러나 그것은 그들 모두를 관통합니다. 내 출력은 훨씬 적습니다 locales -a. 그리고 /var/lib/locales제안하다이 답변내 시스템에도 존재하지 않습니다. 그것이 모든 것을 생성하기로 결정한 이유입니까?

이것을 어떻게 제어할 수 있나요? 도와주세요!

관련 정보