Subject: postgresql looks for 'locale', doesn't find 'usable system locales'

From: Maxime Devos <[email-masked]>
Date: Fri, 29 Jul 2022 14:10:27 +0200

When running "guix system reconfigure", I got the following output:

> making '/gnu/store/2awynl43xf6a58f1g3a89k9jnhh7h2d1-system' the 
> current system...
> setting up setuid programs in '/run/setuid-programs'...
> populating /etc from /gnu/store/acqcpsndw4qw5fnkj6d8vn8yj7w1hv52-etc...
> The files belonging to this database system will be owned by user 
> "postgres".
> This user must also own the server process.
>
> The database cluster will be initialized with locale "en_US.utf8".
> The default database encoding has accordingly been set to "UTF8".
> The default text search configuration will be set to "english".
>
> Data page checksums are disabled.
>
> fixing permissions on existing directory /var/lib/postgresql/data ... ok
> creating subdirectories ... ok
> selecting default max_connections ... 100
> selecting default shared_buffers ... 128MB
> selecting default timezone ... Europe/Brussels
> selecting dynamic shared memory implementation ... posix
> creating configuration files ... ok
> running bootstrap script ... ok
> performing post-bootstrap initialization ... sh: line 1: locale: 
> command not found
> 2022-07-29 14:03:00.754 CEST [13797] WARNING:  no usable system 
> locales were found
> ok
> syncing data to disk ... ok
>
> WARNING: enabling "trust" authentication for local connections
> You can change this by editing pg_hba.conf or using the option -A, or
> --auth-local and --auth-host, the next time you run initdb.
>
> Success. You can now start the database server using:
>
> /gnu/store/qyyvxss45hqi000wwxkbil7qmgr1ra08-postgresql-10.21/bin/pg_ctl 
> -D /var/lib/postgresql/data -l logfile start

In particular, notice: "sh: line 1: locale: command not found", likely a 
substitute* or such is needed to find it.

Greetings,
Maxime.