如何防止重新生成语言环境?

如何防止重新生成语言环境?

在运行 Debian 的本地虚拟机上尝试一些东西。有一个快照,我经常从中恢复。当我来回走动时,我非零次遇到它重新生成语言环境,这需要很长时间,我什至无法杀死它。

第一次,我耐心等待。现在我想阻止这种事情再次发生。现在它已经打开了cmn_TW.UTF-8...,我什至不知道那是什么,更不用说需要它了。尽管如此,我还是得再次坐下来等待他们每个人。

特别是,我需要一些可以放入脚本中的东西,以便在安装这些服务器时使用它来配置它们。它们都运行 Debian 11-12,但这正是运行 Debian 8 的本地虚拟机(是的)。

事情是这样发生的。 (抱歉没能成功使其隐藏.)

# 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建议在这个答案我的系统上甚至不存在。这就是它决定生成所有内容的原因吗?

我该如何控制这个?请帮忙!

相关内容