YSQL fails with invalid locale name "en_US.UTF-8" after install

After installing YugabyteDB, YSQL failed with invalid locale name en_US.UTF-8. The thread is from 2020 and has 64 comments, with maintainer mbautin digging into the root cause. The reporter confirmed the fix worked.

The invalid locale error came from the install layout: when the installation directory is a symlink, postinstall.sh skips the step that rewrites substrings in files to point at the actual install path, so the locale files never get fixed up. The fix is to not install through a symlink, or to re-run the corrected postinstall.sh. The maintainer merged the script fix in commit 18bd3da and it shipped in the next patch release, and the reporter confirmed it worked. Source: https://github.com/yugabyte/yugabyte-db/issues/3732

Source: https://github.com/yugabyte/yugabyte-db/issues/3732