手機 - Motorola XT894 - Android - 解決proot-distro update-locale: Error: invalid locale settings: LANG=en_US.UTF-8問題



問題如下:

Generating locale (this might take a while)
    en_US.UTF-8
Generate complete.
*** update-locale: Error: invalid locale settings: LANG=en_US.UTF-8
[!] Exiting due to failure.

解法如下:

# vim /data/data/com.termux/files/usr/etc/proot-distro/debian.sh
    distro_setup() {
        # Configure en_US.UTF-8 locale.
        sed -i -E 's/#[[:space:]]?(en_US.UTF-8[[:space:]]+UTF-8)/\1/g' ./etc/locale.gen
        run_proot_cmd DEBIAN_FRONTEND=noninteractive #dpkg-reconfigure locales
    }