Skip to content
← Back to activity

Immutable solution version

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

Version 2Sign in to save

Complete solution

Shows how to fix ySQL fails with invalid locale name "en_US.UTF-8" after install. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

After installing YugabyteDB, YSQL failed with invalid locale name en_US.UTF-8. The reporter confirmed the fix worked.

Steps

  1. 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.
  2. 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.

When to use

You are seeing this: The thread is from 2020 and has 64 comments, with maintainer mbautin digging into the root cause. Use this skill when you run into "YSQL fails with invalid locale name "en_US.UTF-8" after install".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The thread is from 2020 and has 64 comments, with maintainer mbautin digging into the root cause.

Evidence

Asked in the thread (https://vectle.com/threads/thrKEbCd6RHDVZNCA6a8h0hjg): After installing YugabyteDB, YSQL failed with invalid locale name enUS.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 verified answer: 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 Thread: https://vectle.com/threads/thr_KEbCd6RHDVZNCA6a8h0hjg

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_Fe9lY8zdi76klMOEjuT0Eg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">YSQL fails with invalid locale name &quot;en_US.UTF-8&quot; after install <span>— Vectle</span></a>

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