From 7def76eb620d2cf957032f670e5780d63c1c187e Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Tue, 28 Jul 2026 05:17:40 +0000 Subject: [PATCH] [FIX] script install: Fedora postgres initdb (locale) + dev group id Tested make install_os on a real Fedora 42 VM (exit 0: gcc 15, psql, node 22 installed). Two fixes from the run: - postgresql-setup --initdb failed with "invalid locale settings" because Fedora cloud images ship no LANG; force a valid locale via PGSETUP_INITDB_OPTIONS=--locale=C.UTF-8 and wipe a partial data dir first (a failed init leaves /var/lib/pgsql/data/log behind and blocks the retry). Verified: cluster PG 16 initialised, service active, erplibre superuser created. - the dev-tools group was referenced by display name ("C Development Tools and Libraries", "No match"); use the group id c-development. Co-Authored-By: Claude Opus 4.8 (1M context) --- script/install/install_fedora_dependency.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/script/install/install_fedora_dependency.sh b/script/install/install_fedora_dependency.sh index a3118d7..8f5a250 100755 --- a/script/install/install_fedora_dependency.sh +++ b/script/install/install_fedora_dependency.sh @@ -18,7 +18,8 @@ DNF="sudo dnf install -y --refresh --skip-unavailable" # Outils de compilation (build Python via pyenv, extensions Python) #-------------------------------------------------- echo -e "\n---- Groupe outils de développement ----" -sudo dnf group install -y --skip-unavailable development-tools "C Development Tools and Libraries" \ +# Groupes par ID (le nom affiché « C Development Tools... » n'est pas matché). +sudo dnf group install -y --skip-unavailable development-tools c-development \ || sudo dnf install -y gcc gcc-c++ make automake patch #-------------------------------------------------- @@ -34,7 +35,11 @@ fi # Initialisation du cluster (Fedora ne le fait pas automatiquement). if [ ! -f /var/lib/pgsql/data/PG_VERSION ]; then echo -e "\n---- Initialisation du cluster PostgreSQL ----" - sudo postgresql-setup --initdb || true + # Nettoie un init partiel et FORCE une locale valide : les images cloud + # Fedora n'ont pas de LANG défini -> « initdb: invalid locale settings ». + sudo rm -rf /var/lib/pgsql/data + sudo PGSETUP_INITDB_OPTIONS="--locale=C.UTF-8 --encoding=UTF8" \ + postgresql-setup --initdb || true fi sudo systemctl enable --now postgresql 2>/dev/null || true # PostGIS : optionnel (géospatial), ne bloque pas.