diff --git a/scripts/install_debian_12.sh b/scripts/install_debian_12.sh index 96824ba8..7ae2f5ec 100755 --- a/scripts/install_debian_12.sh +++ b/scripts/install_debian_12.sh @@ -4,6 +4,13 @@ echo "Debian 12 install start: $(date '+%Y-%m-%d %H:%M:%S')" set -x set -e +# Run the install in a predictable UTF-8 locale. Fresh images (or SSH sessions +# forwarding LC_* variables from the client) may reference an ungenerated +# locale, which makes apt/perl/python emit "Cannot set LC_CTYPE" warnings +# throughout the install. C.UTF-8 is built into glibc, always present, and +# locale-neutral, so this does not change the user's configured locale. +export LC_ALL=C.UTF-8 + # Update if we haven't updated in the last day. [ -z "$(find -H /var/lib/apt/lists -maxdepth 0 -mtime -1)" ] && apt update # Install dependencies. diff --git a/scripts/install_raspberrypios.sh b/scripts/install_raspberrypios.sh index ee122ca4..0c7e2ece 100755 --- a/scripts/install_raspberrypios.sh +++ b/scripts/install_raspberrypios.sh @@ -4,6 +4,13 @@ echo "Raspberry Pi OS install start: $(date '+%Y-%m-%d %H:%M:%S')" set -x set -e +# Run the install in a predictable UTF-8 locale. Fresh images (or SSH sessions +# forwarding LC_* variables from the client) may reference an ungenerated +# locale, which makes apt/perl/python emit "Cannot set LC_CTYPE" warnings +# throughout the install. C.UTF-8 is built into glibc, always present, and +# locale-neutral, so this does not change the user's configured locale. +export LC_ALL=C.UTF-8 + # Update if we haven't updated in the last day. [ -z "$(find -H /var/lib/apt/lists -maxdepth 0 -mtime -1)" ] && apt update # Install dependencies.